IsPlayerNPC
From SA-MP Wiki
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.
(playerid)
| playerid | The ID of the player to check. |
| Returns | 1 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.
- ConnectNPC: Connect an NPC.
- IsPlayerAdmin: Checks if a player is logged into RCON.
