SecretBoss

Untitled

Nov 19th, 2015
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. CMD:admins(playerid, params[])
  2. {
  3. if(GetPlayerScore(playerid) < 50) return Error(playerid, "You need 50 score to see online administrators");
  4. new count = 0, string[828], rank[20];
  5. LOOP_PLAYERS(i)
  6. {
  7. if(IsPlayerConnected(i) && IsPlayerAdminEx(i))
  8. {
  9. count ++;
  10. switch(GetLevel(i))
  11. {
  12. case 1: rank = ""LEVEL1"";
  13. case 2: rank = ""LEVEL2"";
  14. case 3: rank = ""LEVEL3"";
  15. case 4: rank = ""LEVEL4"";
  16. case 5: rank = ""LEVEL5"";
  17. }
  18. format(string, sizeof(string), "%s"white"%i. %s(%i) - "orange"(%s)\n", string, count, GetName(i), i, rank);
  19. }
  20. }
  21. format(string, sizeof(string), "%s\n"white"Total Online Admins: "yellow"%i", string, count);
  22. if(count > 0)
  23. {
  24. Dialog_Show(playerid, dialogUnused, DIALOG_STYLE_MSGBOX, "Online Administrators", string, "OK", "");
  25. }
  26. else if(count == 0) return Error(playerid, "There are currently no admins online");
  27. return 1;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment