[AJUDA] Como fazer comando "Voltar" no Dialog -
vascaino55 - 08.05.2012
Olб, como faзo para voltar para o menu principal de comando o dialog? Olhem abaixo o comandos..
Quero que o player digita /ajuda e seleciona o que quer ver por exemplo, teleportes e apos ver teleportes se ele quiser voltar ele pressiona o "Voltar" do dialog e volta para a tela principal, a que aparece /ajuda.
pawn Код:
if(!strcmp(cmdtext, "/ajuda", true)){
ShowPlayerDialog(playerid, COMANDOSSV, DIALOG_STYLE_LIST, "Selecione abaixo o que desejar:", "- Teleportes\n- Comandos\n", "Selecionar", "Fechar");
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == COMANDOSSV) {
if(response) {
if(listitem == 0) {
new string[300];
strcat(string, "/lv - vai para las venturas\n/avenida - vai apra avenida las venturas\n");
strcat(string, "/teste - comando teste.");
ShowPlayerDialog(playerid, 70001, DIALOG_STYLE_MSGBOX,"Teleportes Disponнveis:",string,"Voltar","Fechar");
return 1;
}
if(listitem == 1) {
new string[300];
strcat(string, "/drop - Vai para o Drop.\n/superrampa - Vai para super rampa.\n/drop2 - Vai para drop2\n");
strcat(string, "/klkkl - comandos teste.");
ShowPlayerDialog(playerid, 70002, DIALOG_STYLE_MSGBOX,"Comandos Disponнveis:",string,"Voltar","Fechar");
return 1;
}
}
}
return 1;
}
Re: [AJUDA] Como fazer comando "Voltar" no Dialog -
Trigo - 08.05.2012
Tipo... coloca um novo item... e nesse item pхe o 'ShowPlayerDialog' que vc quer que volte..
Re: [AJUDA] Como fazer comando "Voltar" no Dialog -
KinX - 08.05.2012
cria novas respostas para certos dialogos
pawn Код:
if(dialogid == 70001)
{
if(response)
{
ShowPlayerDialog(playerid, COMANDOSSV, DIALOG_STYLE_LIST, "Selecione abaixo o que desejar:", "- Teleportes\n- Comandos\n", "Selecionar", "Fechar");
}
}
fiz 1 mini exemplo
Ai vc faz com o de baixo tambйm
Re: [AJUDA] Como fazer comando "Voltar" no Dialog -
vascaino55 - 08.05.2012
CARA EU JA TENTEI POR ISSO, NГO FUNCIONA. ALGUEM QUE INTENDE DO ASSUNTO PODERIA AJUDAR?
Re: [AJUDA] Como fazer comando "Voltar" no Dialog -
ViniBorn - 08.05.2012
Й apenas um exemplo simples, mas vai te ajudar
pawn Код:
if(dialogid == TELEPORTE)
{
if(response)
{
//Vai para o teleporte
}
else
ShowPlayerDialog(...); // Dialog original
}
Re: [AJUDA] Como fazer comando "Voltar" no Dialog -
vascaino55 - 08.05.2012
Tentei por mais nao esta dando certo.
pawn Код:
if(dialogid == COMANDOSSV) {
if(response) {
if(listitem == 0) {
new Teles[999];
new string[256];
format(string, sizeof(string), "/tunelv /avenida /area69 /aerolv /aerolv2 /tunels1 /tunels2\n"); strcat(Teles, string);
format(string, sizeof(string), "/ammu /banco /boate /baia /wang /tunesf /estacaosf /praia\n"); strcat(Teles, string);
format(string, sizeof(string), "/lv /ls /sf /bayside /tunelv /aerosf /chilliad /mar /drift /drift2\n"); strcat(Teles, string);
format(string, sizeof(string), "/tunels2 /c1 /c2 /c3 /c4 /c5 /c6\n"); strcat(Teles, string);
}
else
ShowPlayerDialog(playerid, COMANDOSSV, DIALOG_STYLE_LIST, "Selecione abaixo o que desejar:", "- Teleportes\n- Comandos\n", "Selecionar", "Fechar");
}