/admins
#3

pawn Код:
CMD:admins(playerid, params[])
{
    new name[24], string[60], stringend[60*10+1], count; // max 10 admins in dialog.
    //..
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(pdata[i][Administrador] >= 1)
            {
                GetPlayerName(i, name, sizeof(name));
                format(string, sizeof(string), "%s (%d): %s\n", name, i, AdminLevel(i));
                strcat(stringend, string);
                count++;
            }
        }
    }
    if(count < 1)
        ShowPlayerDialog(playerid, 22, DIALOG_STYLE_MSGBOX, "Online admins", "No players found", "Close","");
    else if(count >= 1)
        ShowPlayerDialog(playerid, 20, DIALOG_STYLE_LIST, "Online admins", stringend, "Close","");
    //..
    return true;
}
Reply


Messages In This Thread
/admins - by TuNiSiAnO1 - 02.03.2015, 08:07
Re: /admins - by CalvinC - 02.03.2015, 08:12
Respuesta: /admins - by JuanStone - 02.03.2015, 08:22

Forum Jump:


Users browsing this thread: 1 Guest(s)