Garry's Mod Wiki

NPC:IsCurrentSchedule

boolean NPC:IsCurrentSchedule( number schedule )

Description

Returns whether or not the NPC is performing the given schedule.

Arguments

1 number schedule
The schedule number, see Enums/SCHED.

Returns

1 boolean
True if the NPC is performing the given schedule, false otherwise.

Example

Function which returns the schedule an NPC is performing.

function GetNPCSchedule(npc) if(!IsValid(npc)) then return end for s = 0, LAST_SHARED_SCHEDULE-1 do if(npc:IsCurrentSchedule(s)) then return s end end return 0 end

Page Links


Special Pages


Wikis

?

Render Time: 96ms

DB GetPage 56
Generate Html 11
SaveChanges (1) 14
Render Body 0
Render Sidebar 12