Advertisement
Peppery

onlineadminlist

Feb 27th, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public OnPlayerCommandText(playerid, cmdtext[])
  2.  
  3. {
  4. dcmd(admins, 6, cmdtext);
  5. return 0;
  6. }
  7.  
  8. dcmd_admins(playerid, params[])
  9. {
  10. SendClientMessage(playerid, COLOR_YELLOW, "Online admins:");
  11. new chose;
  12. for(new i=0;i<MAX_PLAYERS;i++)
  13. {
  14. if(PInfo[i][Level] > 1)
  15. {
  16. new name[60], string[100];
  17. GetPlayerName(i, name, 60);
  18. format(string, sizeof(string), "%s[%i] Level: %i", name, i, PInfo[i][Level]);
  19. strcat(string,
  20. chose = 1;
  21. strcat(holder, string, sizeof(holder));
  22. ShowPlayerDialog(playerid, 236, DIALOG_STYLE_MSGBOX, "Online Admins List", string, "Close", "");
  23. }
  24. }
  25. if(chose == 0)
  26. {
  27. ShowPlayerDialog(playerid, 236, DIALOG_STYLE_MSGBOX, "Online Admins List", "No Administrators Online!", "Close", "");
  28. }
  29. return 1;
  30. #pragma unused params
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement