Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:admins(playerid, params[])
- {
- if(GetPlayerScore(playerid) < 50) return Error(playerid, "You need 50 score to see online administrators");
- new count = 0, string[828], rank[20];
- LOOP_PLAYERS(i)
- {
- if(IsPlayerConnected(i) && IsPlayerAdminEx(i))
- {
- count ++;
- switch(GetLevel(i))
- {
- case 1: rank = ""LEVEL1"";
- case 2: rank = ""LEVEL2"";
- case 3: rank = ""LEVEL3"";
- case 4: rank = ""LEVEL4"";
- case 5: rank = ""LEVEL5"";
- }
- format(string, sizeof(string), "%s"white"%i. %s(%i) - "orange"(%s)\n", string, count, GetName(i), i, rank);
- }
- }
- format(string, sizeof(string), "%s\n"white"Total Online Admins: "yellow"%i", string, count);
- if(count > 0)
- {
- Dialog_Show(playerid, dialogUnused, DIALOG_STYLE_MSGBOX, "Online Administrators", string, "OK", "");
- }
- else if(count == 0) return Error(playerid, "There are currently no admins online");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment