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: HELP (
/showthread.php?tid=165609)
HELP -
GangsTa_ - 05.08.2010
Hi guys.
I made some dialogs for my server (list items) - 2 dialogs. But when I select a item from the second, I get the items from the first. I used if(dialogid == 1) and if(dialogid == 2)
How can I make that each of them will have different items?
Re: HELP -
Zafire1410 - 05.08.2010
When you make a dialog something like this
ShowPlayerDialog(playerid, ID YOU USE FOR THE DIALOG ,DIALOG_STYLE_INPUT,"Title:","Content","Option 1","Option 2");
now you use this
if(dialogid == ID YOU USE FOR DIALOG) //----> The id of the dialog like 1, 2, 3, 4...
{
if(response == 1) // ----> The First Option
{
..................
return 1;
}
else // ------> The Second Option
{
....................
}
return 1;
}
Re: HELP -
[DRD]Rodney - 05.08.2010
The first list item is ID 0
Example:
Код:
#define Car 0
ShowPlayerDialog(playerid,Cars,DIALOG_STYLE_LIST,"Choose your Car","Bullet\r\nTurismo\r\nSuper GT","Accept","Cancel");
Dialog response:
Код:
if(dialogid == Cars)
{
if(response)
{
if(listitem == 0)
{
Bullet
}
if(listitem == 1)
{
Turismo
}
if(listitem == 2)
{
Super GT
}
}
}
Re: HELP -
GangsTa_ - 05.08.2010
No.. . I know it. I'm asking how to make items for the second dialog.
Re: HELP -
Conroy - 05.08.2010
If you know that, then make sure your ShowPlayerDialog doesn't have the same dialogid as the other one.
Re: HELP -
snoob - 05.08.2010
use a string and format(..) it ...
Re: HELP -
GangsTa_ - 05.08.2010
what
??