Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INT_CheckPlayerAdminLevel(playerid, AdminLevel)
- {
- // Setup local variables
- new Level;
- // Check if the player is an RCON admin
- if (IsPlayerAdmin(playerid))
- return 1; // Return 1 to indicate this player has a sufficient admin-level to use a command
- // If the player is not an RCON admin, try to get his admin-level from an external script using a remote function
- Level = CallRemoteFunction("Admin_GetPlayerAdminLevel", "i", playerid);
- // Check if the player has a sufficient admin-level
- if (Level >= AdminLevel)
- return 1; // Return 1 to indicate this player has a sufficient admin-level
- else
- return 0; // Return 0 to indicate this player has an insufficient admin-level
- }
Add Comment
Please, Sign In to add comment