# NPC:SetSchedule

- **Ortam:** Sunucu
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/NPC:SetSchedule
- **Çeviri tarihi:** 2025-09-08

```lua
NPC:SetSchedule( number schedule )
```

## Açıklama

NPC'nin mevcut programını (schedule) ayarlar.

## Argümanlar

1. [number](https://gmod.tr/wiki/number) **schedule**: NPC programı, bkz. [SCHED enum](https://gmod.tr/wiki/Enums/SCHED).

### Örnek

Bir NPC'yi bir entity'e (nesneye) doğru yürümeye zorlayan fonksiyon.

```lua
function NPCMoveTo( npc, ent )

	if ( !IsValid( npc ) or !IsValid( ent ) ) then return end

	npc:SetSaveValue( "m_vecLastPosition", ent:GetPos() )
	npc:SetSchedule( SCHED_FORCED_GO )
	-- npc:SetSchedule( SCHED_FORCED_GO_RUN )

end
```

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/NPC:SetSchedule
