note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
IsPlayerNPC
Description
Check if a player is an actual player or an NPC.
Name | Description |
---|---|
playerid | The 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
}
Related Functions
- ConnectNPC: Connect an NPC.
- IsPlayerAdmin: Checks if a player is logged into RCON.