2 Dialogs[inputtext]{Help} - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 2 Dialogs[inputtext]{Help} (
/showthread.php?tid=255384)
2 Dialogs[inputtext]{Help} -
Gauloises - 15.05.2011
Hello.
Can someone give me please an example for 2 DIALOG_STYLE_INPUT dialogs (inputtext)(
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement
{
case 0:
{
if(strlen(inputtext) > 0)
{
ShowMenuForPlayer(Driftmenu, playerid);
}
else
{
SendClientMessage(playerid,COLOR_RED,"Your input was too short.");
}
}
// Until here.
}
}
return 1;
}
AW: 2 Dialogs[inputtext]{Help} -
Gauloises - 15.05.2011
help please yo
Re: 2 Dialogs[inputtext]{Help} -
MyLife - 15.05.2011
... You mean...
pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"HELLO","Ex1","OK","Exit");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"HELLO","Ex2","OK","Exit");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
//........... OK Button ............
}
else
{
//............ Exit Button ..........
}
}
if(dialogid == 2)
{
if(response)
{
//........... OK Button ............
}
else
{
//............ Exit Button ..........
}
}
}
?
AW: Re: 2 Dialogs[inputtext]{Help} -
Gauloises - 15.05.2011
Yep.thats it! thank ya :P