[DUDA]їCуmo hacer comando /admins un poquito especial?
#2

pawn Код:
stock ShowAdmins(playerid)
{
    new
        string[100],
        Name[MAX_PLAYER_NAME];
   
    for(new i; i < MAX_PLAYERS; i++)//loop
    {
        if(IsPlayerConnected(i) && !IsPlayerNPC(i))//jugadores conectados, y no npcs
        {
            if(Info[i][pAdmin])//si son admins
            {
                GetPlayerName(i, Name, 24);//almacenamos en name el nombre
                format(string, 100, "%s {ffffff}%s %s",(Duty[i]) ? ("[ONDUTY]") : ("[OFFDUTY]"), GetAdminNameLevel( Info[i][pAdmin] ), Name );
                SendClientMessage(playerid, (Duty[i]) ? (0x0000FF00) : (0xFF000000), string);
            }
        }
    }
    return 1;
}

stock GetAdminLevelName(level)
{
        new Admin[20];
    switch(level)
    {
        case 1: Admin = "Moderador";
        case 1338: Admin = "Sub Dueсo";
        // y agregas todos los rangos con el formato mensionado arriba
    }
    return Admin;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)