No categories assigned
LUA:GetNPC
Revision as of 17:53, 1 April 2009 by John Adams (talk | contribs) (New page: == LUA Functions: GetNPC(param, id) == Returns the nearest '''spawn id''' to ''param''. The parameter can be either the targeted player or the NPC. [[Developer:LUA_Functions | Back to LUA...)
LUA Functions: GetNPC(param, id)
Returns the nearest spawn id to param. The parameter can be either the targeted player or the NPC.
Syntax
var = GetNPC(param, id)
Parameters
Required: param (int) - must be one of the vars in the function params, usually "NPC" or "Spawn"
Required: id (int) - must be a valid id in the spawn table
Usage
Need a usage example