IsPlayerNPC

From SA-MP Wiki

Jump to: navigation, search

IsPlayerNPC


Warning: This function was added in SA-MP version 0.3. It is not available in previous versions.


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


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


Returns1 if the player is an NPC or 0 if it's an actual player.


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

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

Personal tools