Zum Hauptinhalt springen

IsPlayerNPC

Description

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

NameDescription
playeridThe ID of the player to check.

Returns

true - The player is an NPC.

false - The player is not an NPC.

Examples

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

// The other code here won't be executed unless its a player
}