IsPlayerNPC

From SA-MP Wiki

Jump to: navigation, search


IsPlayerNPC was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions!


Description:

Check if a player is an actual player or an NPC.


Parameters:
(playerid)
playeridThe ID of the player to check.


Return Values:

  • 1: The player is an NPC.
  • 0: The player is not an NPC.


Example Usage:

public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid))
    {
	SendClientMessageToAll(-1, "An NPC connected!");
	return 1;
    }
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

In other languages