admins command
#1

Код:
CMD:admins(playerid) {

    SendClientMessage(playerid,-1, "_________|- Las Venturas Gang Wars Online Admins -|_________");

    static
        playername[25],
        string[80],
        i;

    for(i = (GetMaxPlayers() - 1); i > -1; --i) {
        if(PlayerInfo[i][Level]) {
            GetPlayerName(i, playername, sizeof playername);
            switch(PlayerInfo[i][Level]) {
                case 1: string = "Moderator";
                case 2: string = "Administrator";
                case 3: string = "Junior Admin";
                case 4: string = "Senior Admin";
                case 5: string = "Head Admin";
                case 6: string = "Mapper";
                case 7: string = "Scripter";
                case 8: string = "Owner";
            }
            
            format(string, sizeof string, "%s - %s", playername, string);
            SendClientMessage(playerid, red, string);
        }
    }

    return 1;
}
I want to add, If server has 0 admins online, I want to send a message saying: No online admins at the moment.
and remove SendClientMessage(playerid,-1, "_________|- Las Venturas Gang Wars Online Admins -|_________");
And I want format(string, sizeof string, "%s - Level: %S %s", playername, level, string);
but it say undefined sysmbol: level
Reply


Messages In This Thread
admins command - by Superhot - 06.10.2013, 21:24
Re: admins command - by Patrick - 06.10.2013, 21:32

Forum Jump:


Users browsing this thread: 1 Guest(s)