CMD:ADMINS (VIPS)
#3



pawn Код:
CMD:admins(playerid, params[])
{
    new count_admins = 0, string[500], fstring[100];

    foreach(new i: Player)
    {
        if(IsPlayerConnected(i))
        {
            if(PlayerInfo[i][AdminLevel] >= 1)
            {
                switch(PlayerInfo[i][AdminLevel])
                {
                    case 1: rank = "level 1";
                    case 2: rank = "level 2";
                    case 3: rank = "level 3";
                    case 4: rank = "level 4";
                    case 5: rank = "level 5";
                }
                count_admins++;
            }
            if(IsPlayerAdmin(i))
            {
                count_admins++;
                rank = "rcon";
            }
            strdel(fstring, 0, 100);
            format(fstring, sizeof(fstring), "{FFFFFF}%s(ID:%d) {44FF00}[Rank: %s]\n", PlayerName(i), i, rank);
            strcat(string, fstring);

            if(count_admins != 0)
            {
                format(fstring, sizeof(fstring), "\r\n\n\n\n\n{FFFFFF}Total Admins: %d", count);
                strcat(string, fstring, 556);
                ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "{44FF00}Online {FFFFFF}Admins", string, "Okay", "");
            }
            else if(count_admins == 0)
            {
                ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, "{44FF00}Online {FFFFFF}Admins", "{FF0000}There is no current admins online!", "Okay", "");
            }
        }
    }
    return true;
}
Reply


Messages In This Thread
CMD:ADMINS (VIPS) - by kalanerik99 - 06.01.2015, 20:23
Re: CMD:ADMINS (VIPS) - by kalanerik99 - 07.01.2015, 13:06
Respuesta: CMD:ADMINS (VIPS) - by JuanStone - 07.01.2015, 16:06
Re: CMD:ADMINS (VIPS) - by NinjaTix - 15.06.2015, 15:35
Re: CMD:ADMINS (VIPS) - by kalanerik99 - 15.06.2015, 16:11

Forum Jump:


Users browsing this thread: 1 Guest(s)