Advertisement
Guest User

Untitled

a guest
Aug 5th, 2014
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. new AdminDuty[MAX_PLAYERS]; //CLEAR THIS ON DISCONNECT/CONNECT.
  2.  
  3.  
  4. //example code:
  5.  
  6. /*
  7.  
  8. REMEMBER TO USE AdminDuty[playerid] = val; wherever you set/load the player stats. Its easy once you get the hang of it.
  9.  
  10.  
  11. */
  12.  
  13. CMD:duty(playerid,params[])
  14. {
  15. if(APlayerData[playerid][PlayerLevel] < 1)return 0; // return 0 here cause admin commands are fun blocked for lower levels.
  16. if(AdminDuty[playerid] == 1)
  17. {
  18. SendClientMessage(playerid, -1, "You are OFF DUTY");
  19. AdminDuty[playerid] = 0;
  20. }
  21. if(AdminDuty[playerid] == 0)
  22. {
  23. SendClientMessage(playerid, -1, "You are ON DUTY");
  24. AdminDuty[playerid] = 1;
  25. }
  26. return 1;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement