Garry's Mod Wiki

Garry's Mod Wiki

  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 SCHED enum.

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

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...