[Ajuda] Colocar /admins em dialog
#3

Quote:
Originally Posted by JoaoMonteiro452
Посмотреть сообщение
Tenta ae

pawn Код:
CMD:admins(playerid)
{
    if(HaveAdminsOnline())
    {
        SendClientMessage(playerid,Rosa,"Admin(s) Online:");
        new adm[15], ad[45], Lista[120];
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(Player[i][admin] != 0)
                {
                    switch(Player[i][admin])
                    {
                        case 1: adm = "Novato";
                        case 2: adm = "Intermediario";
                        case 3: adm = "Veterano";
                        case 11: adm = "Dono";
                        case 10: adm = "Master";
                        format(Lista, sizeof(Lista), "%s%s [%s]\n", Lista, GetName(i), adm);
                    }
                    new var[100];
                    format(var ,sizeof(var), "Administradores Online's");
                    ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_MSGBOX, var, Lista, "Ok", "Fechar");
                }
            }
        }
    }
    else SendClientMessage(playerid,Azul,"Nгo hб admins online!");
    return 1;
}
Isso vai exibir 24327467 dialogs..

PHP код:
CMD:admins(playerid){
    if(!
HaveAdminsOnline())
        return 
SendClientMessage(playerid,Azul,"Nгo hб admins online!");
        
        
    static
        
nome[24],
        
str[128]
    ;
    
    
str[0] = '\0';
    
    for(new 
iGetPlayerPoolSize(); e; ++i)
    {
        if(
Player[i][admin] > 0)
        {
            switch(
Player[i][admin])
            {
                case 
1adm "Novato";
                case 
2adm "Intermediario";
                case 
3adm "Veterano";
                case 
11adm "Dono";
                case 
10adm "Master";
            }
            
            
GetPlayerName(inome24);
            
strcat(strnome);
        }
    }
    
    
ShowPlayerDialog(playerid657DIALOG_STYLE_LIST"Administradores",  str"Okay""");

Reply


Messages In This Thread
Colocar /admins em dialog - by viniciussantos664 - 11.07.2015, 17:44
Re: Colocar /admins em dialog - by JoaoMonteiro452 - 11.07.2015, 18:23
Re: Colocar /admins em dialog - by zSuYaNw - 11.07.2015, 18:34
Re: Colocar /admins em dialog - by ModaLOKO - 11.07.2015, 19:16

Forum Jump:


Users browsing this thread: 1 Guest(s)