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

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "findnpc" )
	{
		FindNPC( 0 );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Finding and counting entities

Categories: Server functions | Finding and counting entities