SA-MP Forums Archive
Detecting if dialog exited? - 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: Detecting if dialog exited? (/showthread.php?tid=97683)



Detecting if dialog exited? - Norn - 15.09.2009

Is there a way to detect if the dialog exited without adding a custom variable and editing it manually on OnDialogResponse? I've got a function to exit the current dialog from the player and a OnPlayerKeyState call that will exit the dialog, but i don't want it randomly calling the function without a check to see if the dialog is currently running.

Any ideas?


Re: Detecting if dialog exited? - Norn - 16.09.2009

Quote:
Originally Posted by Seif_ [adream-rp.com
]
You'd have to use a variable. It's just setting it to 1 when you appear a dialog to a player and 0 in OnDialogResponse. But if you don't wanna do that, you could make an include that would do that and not interfere in your GM/FS script.

EDIT: try this, untested: http://pastebin.com/f317bfb43
I'll try it tomorrow, cheers mate.

Going to bed now.