09.06.2016, 11:15
If you indent your code you would see the problem...
Don't you think there's something missing?
Код:
CMD:admins(playerid, params[]) { SendClientMessage(playerid, green, " "); SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________"); SendClientMessage(playerid, green, " "); new count = 0; for(new i = 0; i < MAX_PLAYERS; i++) { if(!IsPlayerConnected(i)) continue; if(!PlayerInfo[i][Level]) continue; new string[90], playersname[MAX_PLAYER_NAME]; GetPlayerName(i, playersname, sizeof(playersname)); if(IsPlayerAdmin(playerid)) { format(string, sizeof(string), "{FF0000}%s (ID:%i) - Level: %d | RCON Administrator | Playing!", playersname, i, PlayerInfo[i][Level]); } else { switch(PlayerInfo[i][Level]) { case 1: format(string, sizeof(string), "{33AA33}%s (ID:%i) - Level: %d | Basic Moderator | Playing!", playersname, i, PlayerInfo[i][Level]); case 2: format(string, sizeof(string), "{33AA33}%s (ID:%i) - Level: %d | Moderator | Playing!", playersname, i, PlayerInfo[i][Level]); case 3: format(string, sizeof(string), "{FFFF00}%s (ID:%i) - Level: %d | Master Moderator | Playing!", playersname, i, PlayerInfo[i][Level]); case 4: format(string, sizeof(string), "{000000}%s (ID:%i) - Level: %d | Administrator | Playing!", playersname, i, PlayerInfo[i][Level]); case 5: format(string, sizeof(string), "{33CCFF}%s (ID:%i) - Level: %d | Master Administrator | Playing!", playersname, i, PlayerInfo[i][Level]); case 6: format(string, sizeof(string), "{C0C0C0}%s (ID:%i) - Level: %d | Elite Admin | Playing!", playersname, i, PlayerInfo[i][Level]); case 7: format(string, sizeof(string), "{FF0000}%s (ID:%i) - Level: %d | General | Playing!", playersname, i, PlayerInfo[i][Level]); case 8: format(string, sizeof(string), "{4169FF}%s (ID:%i) - Level: %d | Director | Playing!", playersname, i, PlayerInfo[i][Level]); case 9: format(string, sizeof(string), "{FF9900}%s (ID:%i) - Level: %d | Server Head | Playing!", playersname, i, PlayerInfo[i][Level]); case 999: format(string, sizeof(string), "{AA3333}%s (ID:%i) - Level: %d | Co-Owner | Playing!", playersname, i, PlayerInfo[i][Level]); case 99999: format(string, sizeof(string), "{4169FF}%s (ID:%i) - Level: %d | Owner | Playing!", playersname, i, PlayerInfo[i][Level]); default: continue; } SendClientMessage(playerid, red, string); count++; } if(!count) SendClientMessage(playerid, red, "No admin online in the list"); SendClientMessage(playerid, green, "________________________________________"); return 1; }