SA-MP Forums Archive
[Ajuda] Dialog com botхes - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Dialog com botхes (/showthread.php?tid=566420)



Dialog com botхes - Patrick141 - 05.03.2015

Estava vendo um Tutorial aqui do JFS , sobre dialog..... e estava criando uma dialog com 2 botoes
funcionou tudo certinho , porem eu nao consigo colocar + uma dialog com o botao proximo
eu fiz assim e ta funcionando , porem eu quero fazer + 1 uma dialog, assim :
1є Dialog aparece o botao proximo , aparece o 2є dialog tudo certinho , porem eu nao consigo colocar + 1 dialog ,
ou seja o 3є , vejam :
pawn Код:
if(dialogid == 4)
{
if(response == 0)
{
SendClientMessage(playerid, Verde, "[Info]: If you have a question look for a admin.");
}
if(response == 1) // Lado Esquerdo Ou Seja " Proximo "
{
// Coloque Aqui as Funзхes ao Clickar " Proximo ", Quando Ele Clickar Proximo Vamos Fazer Abrir Outro MSGBOX.
ShowPlayerDialog(playerid, Cmds+1, DIALOG_STYLE_MSGBOX,"{F6FF00}Commands List {FFFFFF}:","{8FF63B}/Forum {5500FF}:Forum link\n{8FF63B}/Rules {5500FF}:To see the rules\n{8FF63B}/Skin {5500FF}:Change your skin\n{8FF63B}/Saveskin {5500FF}:Save your skin\n{8FF63B}/Teles {5500FF}:Teleporters\n{8FF63B}/Animlist {5500FF}:List of animations\n{8FF63B}/Credits {5500FF}:About the Server\n{8FF63B}/WantedL {5500FF}:Wanted List", "Next", "Close");
}
if(response == 2) // Lado Esquerdo Ou Seja " Proximo "
{
ShowPlayerDialog(playerid, Cmds+2, DIALOG_STYLE_MSGBOX,"{F6FF00}Commands List {FFFFFF}:","{8FF63B}/Minigames {5500FF}:Minigame List", "Close", "");
}
// Sу Para Lembrar no Final Estб Apenas UM Botгo, Estao Apenas Usamos Response, Nгo Precisa por == 0.
// й tб JFS+1 й So Para Nгo Definir Denovo ai Da Para Acrescentar +1,+2,+3,+4...

}
o que esta errado ?


Re: Dialog com botхes - MultiKill - 05.03.2015

@Removido

Edit:

pawn Код:
if(dialogid == 4)
{
    if(response == 0)
    {
        SendClientMessage(playerid, Verde, "[Info]: If you have a question look for a admin.");
    }
    if(response == 1) // Lado Esquerdo Ou Seja " Proximo "
    {
        // Coloque Aqui as Funзхes ao Clickar " Proximo ", Quando Ele Clickar Proximo Vamos Fazer Abrir Outro MSGBOX.
        ShowPlayerDialog(playerid, Cmds+1, DIALOG_STYLE_MSGBOX,"{F6FF00}Commands List {FFFFFF}:","{8FF63B}/Forum {5500FF}:Forum link\n{8FF63B}/Rules {5500FF}:To see the rules\n{8FF63B}/Skin {5500FF}:Change your skin\n{8FF63B}/Saveskin {5500FF}:Save your skin\n{8FF63B}/Teles {5500FF}:Teleporters\n{8FF63B}/Animlist {5500FF}:List of animations\n{8FF63B}/Credits {5500FF}:About the Server\n{8FF63B}/WantedL {5500FF}:Wanted List", "Next", "Close");
    }
}

if(dialogid == Cmds+1)
{
    if(response) // Lado Esquerdo Ou Seja " Proximo "
    {
        ShowPlayerDialog(playerid, Cmds+2, DIALOG_STYLE_MSGBOX,"{F6FF00}Commands List {FFFFFF}:","{8FF63B}/Minigames {5500FF}:Minigame List", "Close", "");
    }
}



Re: Dialog com botхes - Bruno_Cyra - 05.03.2015

Na callback OnDialogResponse o parвmetro response sу pode ser 0 ou 1, vocк colocou um if com ele valendo 2, essa condiзгo nunca serб atendida.

Olhe para ver mais informaзхes, clique aqui

O correto й vocк colocar as sequкncias das dialogs de forma que se response for 1 entгo ele prossegue, senгo ele volta (response й igual a 1 caso o player clique no botгo esquerdo e 0 quando clica no botгo direito, se sу houver 1 botгo ela sempre chamarб 1).

entгo crie a dialog com o id de cmds + 1 e dentro da resposta dela chame a terceira dialog.


Re: Dialog com botхes - Patrick141 - 05.03.2015

Quote:
Originally Posted by Bruno_Cyra
Посмотреть сообщение
Na callback OnDialogResponse o parвmetro response sу pode ser 0 ou 1, vocк colocou um if com ele valendo 2, essa condiзгo nunca serб atendida.

Olhe para ver mais informaзхes, clique aqui

O correto й vocк colocar as sequкncias das dialogs de forma que se response for 1 entгo ele prossegue, senгo ele volta (response й igual a 1 caso o player clique no botгo esquerdo e 0 quando clica no botгo direito, se sу houver 1 botгo ela sempre chamarб 1).

entгo crie a dialog com o id de cmds + 1 e dentro da resposta dela chame a terceira dialog.
Fiz ao seu modo , porem , agora ele esta pulando uma dialog ex : vc percebeu no meu code que tem 2 dialogs correto ? entao , quando fui colocar o 3є dentro do response ele ta pulando o 2є


Re: Dialog com botхes - Bruno_Cyra - 06.03.2015

Tente usar esse cуdigo do MultiKill substituindo o Cmds + 1 pelo valor da dialog.


Re: Dialog com botхes - Patrick141 - 06.03.2015

Quote:
Originally Posted by MultiKill
Посмотреть сообщение
@Removido

Edit:

pawn Код:
if(dialogid == 4)
{
    if(response == 0)
    {
        SendClientMessage(playerid, Verde, "[Info]: If you have a question look for a admin.");
    }
    if(response == 1) // Lado Esquerdo Ou Seja " Proximo "
    {
        // Coloque Aqui as Funзхes ao Clickar " Proximo ", Quando Ele Clickar Proximo Vamos Fazer Abrir Outro MSGBOX.
        ShowPlayerDialog(playerid, Cmds+1, DIALOG_STYLE_MSGBOX,"{F6FF00}Commands List {FFFFFF}:","{8FF63B}/Forum {5500FF}:Forum link\n{8FF63B}/Rules {5500FF}:To see the rules\n{8FF63B}/Skin {5500FF}:Change your skin\n{8FF63B}/Saveskin {5500FF}:Save your skin\n{8FF63B}/Teles {5500FF}:Teleporters\n{8FF63B}/Animlist {5500FF}:List of animations\n{8FF63B}/Credits {5500FF}:About the Server\n{8FF63B}/WantedL {5500FF}:Wanted List", "Next", "Close");
    }
}

if(dialogid == Cmds+1)
{
    if(response) // Lado Esquerdo Ou Seja " Proximo "
    {
        ShowPlayerDialog(playerid, Cmds+2, DIALOG_STYLE_MSGBOX,"{F6FF00}Commands List {FFFFFF}:","{8FF63B}/Minigames {5500FF}:Minigame List", "Close", "");
    }
}
Opa vlw ,funcionou + rep