SA-MP Forums Archive
Group Dialog in GPS System [+rep] - 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)
+--- Thread: Group Dialog in GPS System [+rep] (/showthread.php?tid=601137)



Group Dialog in GPS System [+rep] - vrrp - 17.02.2016

Hi guys , I want to make a Group in GPS System:
So , I want to show a group like :
-Departaments , you select departaments , click ok and show all departaments and after you pick one and set a checkpoint .
I thinks it`s named Group Dialog or something like that , i dont know .
Thanks .


Re: Group Dialog in GPS System [+rep] - vrrp - 17.02.2016

Bump.


Re: Group Dialog in GPS System [+rep] - HazardouS - 17.02.2016

It doesn't have a name, it's a normal dialog, just like other dialogs.
First, you will display a general dialog that contains the main categories.

ShowPlayerDialog(..."Departments\nOther Factions\nBacon\nSalami", ...);

That string would be the "info[]" field of the dialog. Now, according to the DialogID that you specify in the ShowPlayerDialog function, you will handle the response in the OnDialogResponse callback (using the parameter "listitem"). If listitem == 0 (the first option), then the player selected Departments, so you will show another ShowPlayerDialog, with a DIFFERENT DialogID, that will have another handle defined in the same callback mentioned above.