Just a small question
#2

Not sure.
pawn Код:
CMD:admins(playerid, params[])
{
    new OnAdmins = 0;
    SCM(playerid,-1,"-----------------------------------Admins Online-----------------------------------");
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
            if(PlayerData[i][AdminLevel] != 0 && hide[i] == 0) {
                GetPlayerName(i,Nam,MAX_PLAYER_NAME);
                if(PlayerData[i][AdminLevel] == 5) {
                    format(str, sizeof(str), "%s level 5 (Head Admin)",Nam);
                    SCM(playerid,COLOR_YELLOW,str);
                }
                if(PlayerData[i][AdminLevel] == 4) {
                    format(str, sizeof(str), "%s level 4 (Lead Admin)",Nam);
                    SCM(playerid,COLOR_BLUE,str);
                }
                if(PlayerData[i][AdminLevel] == 3) {
                    format(str, sizeof(str), "%s level 3 (Administrator)",Nam);
                    SCM(playerid,red,str);
                }
                if(PlayerData[i][AdminLevel] == 2) {
                    format(str, sizeof(str), "%s level 2 (Global Moderator)",Nam);
                    SCM(playerid,COLOR_LIMEGREEN,str);
                }
                if(PlayerData[i][AdminLevel] == 1) {
                    format(str, sizeof(str), "%s level 1 (Server Moderator)",Nam);
                    SCM(playerid,COLOR_LIMEGREEN,str);
                }
                OnAdmins ++;
            }
        }
    }
    if(OnAdmins == 0) {
        SCM(playerid,0xFF0000FF,"No Admins are connected in the server.");
    }
    if(OnAdmins == 1) {
        format(str,sizeof(str),"There is only %d admin connected right now!",OnAdmins);
        SCM(playerid,orange,str);
    }
    if(OnAdmins > 1) {
        format(str,sizeof(str),"There are %d admins connected right now!",OnAdmins);
        SCM(playerid,orange,str);
    }
    return 1;
}
Reply


Messages In This Thread
Just a small question - by Tanush123 - 08.01.2012, 15:39
Re: Just a small question - by Konstantinos - 08.01.2012, 15:42
Re: Just a small question - by Tanush123 - 08.01.2012, 16:36
Re: Just a small question - by Rob_Maate - 08.01.2012, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)