08.11.2016, 12:26
Код:
COMMAND:admins(playerid,params[]) { new count = 0; new string[128]; SendClientMessage(playerid,COLOR_RED,""); SendClientMessage(playerid,COLOR_GREEN,"________________|ONLINE ADMINS|________________"); SendClientMessage(playerid,COLOR_RED,""); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] > 0) { if(PlayerInfo[i][pAdmin] == 1) { AdminRank = "Moderator"; } else if(PlayerInfo[i][pAdmin] == 2) { AdminRank = "General Administrator"; } else if(PlayerInfo[i][pAdmin] == 3) { AdminRank = "Senior Administrator"; } else if(PlayerInfo[i][pAdmin] == 4) { AdminRank = "Server Owner"; } new Name[MAX_PLAYER_NAME]; GetPlayerName(i,Name,sizeof(Name)); format(string, sizeof(string), "Level: %d | Name: %s (ID:%i) | Rank: %s ", PlayerInfo[i][pAdmin], Name,i,AdminRank); SendClientMessage(playerid,COLOR_CYAN,string); count++; } } } if(count == 0) SendClientMessage(playerid,COLOR_RED,"No Admins online!"); SendClientMessage(playerid,COLOR_GREEN,"_________________________________________________"); return 1; }