Scripting/Server/Functions/FindNPC
NPC handle or null. id is npc.NPCID (0-63); the entity slot npc.ID is also accepted.
Syntax
FindNPC(id)Arguments
- int id –
idisnpc.NPCID(0-63); the entity slotnpc.IDis also accepted.
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "findnpc" )
{
FindNPC( 0 );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- FindPlayer
- FindVehicle
- FindObject
- FindPickup
- FindSphere
- FindBlip
- GetPlayers
- GetMaxPlayers
- GetClosestPlayer
- GetVehicleCount
- GetObjectCount
- KickPlayer
Section: Finding and counting entities
Categories: Server functions | Finding and counting entities