30.06.2016, 21:14
This should work.
If it doesn't, then there's probably something wrong with PlayerInfo[i][pAdminLevel].
Код:
cmd(admins playerid, params[]) { SendClientMessage(playerid, COLOR_ADMIN, "Online Staff Members:"); new count, string[62], aname[24]; for(new i = 0; i < MAX_PLAYERS; i++) { if(!IsPlayerConnected(i)) continue; string[0] = EOS; switch(PlayerInfo[i][pAdminLevel]) { case 1: strcat(string, "{10F441}Beta Tester"); case 2: strcat(string, "{10F441}Moderator"); case 3: strcat(string, "{33AA33}Administrator"); case 4: strcat(string, "{FF0000}Senior Administrator"); case 1337: strcat(string, "{FF0000}Head Administrator"); default: continue; } GetPlayerName(i, aname, 24); format(string, sizeof (string), "%s(%d) - %s", aname, i, string); SendClientMessage(playerid, -1, string); count++; } if(count == 0) return SendClientMessage(playerid, COLOR_ERROR, "No online administrators found."); return 1; }