[Ajuda] Transforma em DIALOG_STYLE_LIST.
#1

Queria transforma esse comando em DIALOG_STYLE_LIST estou com uma duvida em como fazer. Por favor alguйm pode me ajuda.


PHP код:
    CMD:admins(playeridparams[])
 {
        
SendClientMessage(playeridCOR_ADMIN"Admins Online:");
        foreach(
Playeri)
        {
            if(
PlayerInfo[i][pAdmin] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
string[200];
                    if(
admtrampando[i] == 1)
                    {
                        if(
PlayerInfo[i][pAdmin] == 1337)
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Master{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 3001)
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Subdono{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 5000)
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Fundador{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 1338)
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Gerente{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]"sendername,PlayerInfo[i][pFuncao]);
                        else
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]"sendernamePlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        if(
PlayerInfo[i][pAdmin] == 1337)
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Master{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 3001)
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Subdono{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 5000)
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Fundador{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]"sendername,PlayerInfo[i][pFuncao]);
                        else if(
PlayerInfo[i][pAdmin] == 1338)
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Gerente{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]"sendername,PlayerInfo[i][pFuncao]);
                        else
                            
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]"sendernamePlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                }
            }
            if(
PlayerInfo[i][pAdminTemp] > 0)
            {
                if(
admhide[i] == 0)
                {
                    
GetPlayerName(isendernamesizeof(sendername));
                    new 
string[128];
                    if(
admtrampando[i] == 1)
                    {
                        
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Temporбrio{B4B5B7}]"sendername);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                    else
                    {
                        
format(string128"Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Temporбrio{B4B5B7}] {FFFFFF}[Jogando]"sendername);
                        
SendClientMessage(playerid,COLOR_GRAD1,string);
                    }
                }
            }
        }
        return 
true;
    } 
Reply
#2

Acho que ficaria interessante vocк separar entгo por list, tipo, tem adm temp, dai list 0 ao responder ele abre a lista com os adm temp... mas acredito que assim dк certo:

pawn Код:
CMD:admins(playerid, params[])
 {
       
        foreach(Player, i)
        {
            if(PlayerInfo[i][pAdmin] > 0)
            {
                if(admhide[i] == 0)
                {
                    GetPlayerName(i, sendername, sizeof(sendername));
                    new string[200];
                    if(admtrampando[i] == 1)
                    {
                        if(PlayerInfo[i][pAdmin] == 1337)
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Master{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]", sendername,PlayerInfo[i][pFuncao]);
                        else if(PlayerInfo[i][pAdmin] == 3001)
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Subdono{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]", sendername,PlayerInfo[i][pFuncao]);
                        else if(PlayerInfo[i][pAdmin] == 5000)
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Fundador{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]", sendername,PlayerInfo[i][pFuncao]);
                        else if(PlayerInfo[i][pAdmin] == 1338)
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Gerente{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]", sendername,PlayerInfo[i][pFuncao]);
                        else
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}]", sendername, PlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                        ShowPlayerDialog(playerid, DIALOG_DEFINA, DIALOG_STYLE_LIST, "Administradores Online (muda aqui tb)",string,"Confirmar","Cancelar");
                    }
                    else
                    {
                        if(PlayerInfo[i][pAdmin] == 1337)
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Master{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]", sendername,PlayerInfo[i][pFuncao]);
                        else if(PlayerInfo[i][pAdmin] == 3001)
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Subdono{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]", sendername,PlayerInfo[i][pFuncao]);
                        else if(PlayerInfo[i][pAdmin] == 5000)
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Fundador{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]", sendername,PlayerInfo[i][pFuncao]);
                        else if(PlayerInfo[i][pAdmin] == 1338)
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Gerente{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]", sendername,PlayerInfo[i][pFuncao]);
                        else
                            format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}%d{B4B5B7}] Funзгo:[{FFFFFF}%s{B4B5B7}] {FFFFFF}[Jogando]", sendername, PlayerInfo[i][pAdmin],PlayerInfo[i][pFuncao]);
                        ShowPlayerDialog(playerid, DIALOG_DEFINA, DIALOG_STYLE_LIST, "Administradores Online (muda aqui tb)",string,"Confirmar","Cancelar");
                    }
                }
            }
            if(PlayerInfo[i][pAdminTemp] > 0)
            {
                if(admhide[i] == 0)
                {
                    GetPlayerName(i, sendername, sizeof(sendername));
                    new string[128];
                    if(admtrampando[i] == 1)
                    {
                        format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Temporбrio{B4B5B7}]", sendername);
                        ShowPlayerDialog(playerid, DIALOG_DEFINA, DIALOG_STYLE_LIST, "Administradores Online (muda aqui tb)",string,"Confirmar","Cancelar");
                    }
                    else
                    {
                        format(string, 128, "Admin: {FFFFFF}%s {B4B5B7}Nнvel:[{FFFFFF}Temporбrio{B4B5B7}] {FFFFFF}[Jogando]", sendername);
                       ShowPlayerDialog(playerid, DIALOG_DEFINA, DIALOG_STYLE_LIST, "Administradores Online (muda aqui tb)",string,"Confirmar","Cancelar");
                    }
                }
            }
        }
        return true;
    }
Obviamente vocк vai ter que criar cada dialogid e organizar todos quando (response) para aparecer as devidas msg..
sugiro um dialog que abra as opзoes exemplo ShowPlayerDialog(playerid, DIALOG_DEFINA, DIALOG_STYLE_LIST, "Admins","Temporario\nMasters\nAjudante","Confirma r","");

vocк vai ter que ajeitar cada um conforme seu GM.
Reply
#3

PHP код:
C:\Users\Narielson\Documents\Gamemode\AQUI\gamemodes\BPG.pwn(83604) : error 017undefined symbol "DIALOG_DEFINA"
C:\Users\Narielson\Documents\Gamemode\AQUI\gamemodes\BPG.pwn(83618) : error 017undefined symbol "DIALOG_DEFINA"
C:\Users\Narielson\Documents\Gamemode\AQUI\gamemodes\BPG.pwn(83631) : error 017undefined symbol "DIALOG_DEFINA"
C:\Users\Narielson\Documents\Gamemode\AQUI\gamemodes\BPG.pwn(83636) : error 017undefined symbol "DIALOG_DEFINA" 
deu esses erros aqui
Reply
#4

ah sim entendi agr, irei fazer isso que vc falou vou tenta aqui
Reply
#5

sim sim, vocк tem que criar as dialogs, principalmente no ondialogresponse!!

depois atualiza ai pra ve se deu, й bem trabalhoso \:
Reply
#6

obrigado man. deu certo <3 vou tenta melhor o dialong
Reply
#7

Boa! agora й sу ir organizando do seu jeito ^.^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)