RCON Administrator Help
#2

If you indent your code you would see the problem...
Код:
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;
}
Don't you think there's something missing?
Reply


Messages In This Thread
RCON Administrator Help - by Filbert - 09.06.2016, 11:10
Re: RCON Administrator Help - by Stinged - 09.06.2016, 11:15
Re: RCON Administrator Help - by F1N4L - 09.06.2016, 11:15
Re: RCON Administrator Help - by Filbert - 09.06.2016, 11:16
Re: RCON Administrator Help - by ManIsHere - 09.06.2016, 11:17
Re: RCON Administrator Help - by Stinged - 09.06.2016, 11:18
Re: RCON Administrator Help - by Filbert - 09.06.2016, 11:20
Re: RCON Administrator Help - by Filbert - 09.06.2016, 11:59
Re: RCON Administrator Help - by Stinged - 09.06.2016, 12:01
Re: RCON Administrator Help - by Filbert - 09.06.2016, 12:04

Forum Jump:


Users browsing this thread: 1 Guest(s)