[Ajuda] /admins em dialog
#2

Testa ai pra ver se funciona

Код:
if(strcmp(cmd, "/admins", true) == 0) 
    { 
        new count=0, strcmd[128], int_val, cargo[27], pstate[9], strdest[500];

        for(new j=GetPlayerPoolSize(),i; i!=j; ++i)
        { 
            if(IsPlayerConnected(i)) 
            { 
                format(file, sizeof(file), PASTA_ADMINS, GetPlayerNameEx(i));

                if(!fexist(file))
                	continue;

                count++;
                
                int_val = dini_Int(file, "ALevel");

                switch(int_val) {

                case 1:cargo="[ AUXILIAR™ ]";
                case 2:cargo="[ AJUDANTE™ ]";
                case 3:cargo="[ SUB - ADMINISTRADOR™ ]";
                case 4:cargo="[ ADMINISTRADOR™ ]";
                case 5:cargo="[ GERENTE™ ]";
                case 6:cargo="[ SUB - DONO™ ]";
                case 7:cargo="[ DONO™ ]";
            	}
                pstate=((AFK[i]==0)?("[ OFF ]"):("[ ON ]"));

                format(strcmd, sizeof strcmd, "{828282}%s [ %d ]\t\t{00FF00}%s\t\t{00FF00}%s", GetPlayerNameEx(i), i,cargo, pstate);
           		strcat(strdest, strcmd, sizeof strdest);
             
            } 
        } 
        if(!count) 
        { 
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, "{FFFFFF}ADM's Online [ {FF0000}0{FFFFFF} ]", "{FF0000}Nгo hб menbros da Administraзгo Online", "OK", ""); 
        } 
        else 
        { 
            new msg[50];
            format(msg, sizeof(msg), "{FFFFFF}ADM's Online [ {00FF00}%d{FFFFFF} ]", count); 
        
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, msg, strdest, "OK", ""); 
        } 
        return 1; 
    }
Reply


Messages In This Thread
/admins em dialog - by Arleann - 15.05.2018, 21:10
Re: /admins em dialog - by DarkBr - 15.05.2018, 23:35
Re: /admins em dialog - by Arleann - 16.05.2018, 23:16

Forum Jump:


Users browsing this thread: 1 Guest(s)