[AJUDA]Como Criar Menu Em Dialog -
duany123 - 19.08.2010
Tipo Galera Queria Colocar Um Menu Em Dialog ..
Tipo Quando O Player Digitar : /tpd
Aparece Em Dialog :
TPD1
TPD2
TPD3
TPD4
TPD5
TPD6
Ai Ao Ele Escolher Uma Dessas Pistas Ele Ia Para Aquela Pista ...
Como Fazer ?
Obrigado ...
Re: [AJUDA]Como Criar Menu Em Dialog -
zSuYaNw - 19.08.2010
Usa Search! tem um tutorial para isto!
Re: [AJUDA]Como Criar Menu Em Dialog -
TiagoPS - 20.08.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/tpd", true) == 0
{
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_LIST, "Teleportes", "TPD1\nTPD2\nTPD3\nTPD4\nTPD5\nTPD6", "Seleciona", "Cancela");
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 123)
{
if(response == 0)
{
if(listitem == 0)
{
SetPlayerPos(playerid, coordX, coordY,coordZ);
SendClientMessage(playerid,COR,"Olб vc foi para TPD1");
return 1;
}
if(listitem == 1)
{
SetPlayerPos(playerid, coordX, coordY, coordZ);
SendClientMessage(playerid,COR,"Olб vc foi para TPD2");
return 1;
}
if(listitem == 2)
{
SetPlayerPos(playerid, coordX, coordY, coordZ);
SendClientMessage(playerid,COR,"Olб vc foi para TPD3");
return 1;
}
if(listitem == 3)
{
SetPlayerPos(playerid, coordX, coordY, coordZ);
SendClientMessage(playerid,COR,"Olб vc foi para TPD4");
return 1;
}
if(listitem == 4)
{
SetPlayerPos(playerid, coordX, coordY, coordZ);
SendClientMessage(playerid,COR,"Olб vc foi para TPD5");
return 1;
}
if(listitem == 5)
{
SetPlayerPos(playerid, coordX, coordY, coordZ);
SendClientMessage(playerid,COR,"Olб vc foi para TPD6");
return 1;
}
}
}
}
E assim sucessivamente sу que organiza melhor pra nгo dar warnings de loose indentation й que aqui no forum nгo to conseguindo codar certo fica dando muito espaзo
Re: [AJUDA]Como Criar Menu Em Dialog -
duany123 - 20.08.2010
Код:
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(993) : error 017: undefined symbol "SendCLientMessage"
D:\Duany\Jogos\Samp R8\gamemodes\TPD.pwn(996) : error 030: compound statement not closed at the end of file (started at line 984)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Valeu Ae Pela Ajuda Mais Aparareceu 2 Warning Ajuda Ae Valeu !
Re: [AJUDA]Como Criar Menu Em Dialog -
Thebest96 - 26.08.2010
o primeiro error, e culpa de quem deu o code, nao e SendCLientMessage, e SendClientMessage
Re: [AJUDA]Como Criar Menu Em Dialog -
zSuYaNw - 26.08.2010
Tutorial aqui:
https://sampforum.blast.hk/showthread.php?tid=119297
Re: [AJUDA]Como Criar Menu Em Dialog -
TiagoPS - 26.08.2010
ta mas vc tinha que terminar a colocar tudo o que queira e depois fechar as } de maneira a fechar todos os
If abertos para nгo dar erro 030
o primeiro o carinha ali ja falow й so trocar SendCLientMessage por SendClientMessage й que na hora escrevi rapido e nem percebi o erro
@EDIT
Olha la meu primeiro post fiz todo o codigo para vocк so coloque es cordenadas coretas para nгo dar erro