IsPlayerAdmin
From SA-MP Wiki
IsPlayerAdmin
This function can be used to check if a player is logged in as RCON-administrator, using the in-game available /rcon commands.
(playerid)
| playerid | The playerid you would like to check |
| Returns | Returns true if the player is an admin, or false if the player isn't. |
public OnPlayerSpawn(playerid, cmdtext[]) { if(IsPlayerAdmin(playerid)) SendClientMessageToAll(0xDEEE20FF, "An admin spawned."); if(!IsPlayerAdmin(playerid)) SendClientMessageToAll(0xDEEE20FF, "A user spawned."); return 1; }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- SendRconCommand: Sends an RCON command via the script.
Related Callbacks
The following callbacks might be useful, as they're related to this function in one way or another.
- OnRconLoginAttempt: Called when an attempt to login to RCON is made.
