Guest User

Untitled

a guest
May 22nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. INT_CheckPlayerAdminLevel(playerid, AdminLevel)
  2. {
  3. // Setup local variables
  4. new Level;
  5.  
  6. // Check if the player is an RCON admin
  7. if (IsPlayerAdmin(playerid))
  8. return 1; // Return 1 to indicate this player has a sufficient admin-level to use a command
  9.  
  10. // If the player is not an RCON admin, try to get his admin-level from an external script using a remote function
  11. Level = CallRemoteFunction("Admin_GetPlayerAdminLevel", "i", playerid);
  12. // Check if the player has a sufficient admin-level
  13. if (Level >= AdminLevel)
  14. return 1; // Return 1 to indicate this player has a sufficient admin-level
  15. else
  16. return 0; // Return 0 to indicate this player has an insufficient admin-level
  17. }
Add Comment
Please, Sign In to add comment