SA-MP Forums Archive
[FilterScript] Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] (/showthread.php?tid=166289)



Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - ev0lution - 08.08.2010

Dialog Controller
Dynamically create and show dialogs!
What is it?
Dialog Controller allows you to dynamically create dialogs and show them to players. It keeps track of dialog data, and also handles OnDialogResponse.
The system consists of a filterscript, which keeps track of everything and actually shows the dialogs, and an include, which you include in any script you want to use this system. Dialog IDs will not clash, provided you only use this system.
It provides a system which you can use to easily create dialogs and assign them to variables, then show them whenever necessary. You won't ever have to worry about dialog IDs.

How do I use it?
Copy the compiled filterscript to your server's filterscript directory, or compile it from the source provided. Load the filterscript as you normally would, by adding "dialog" to your filterscripts line.
Include the "dialog.inc" file in any scripts which you would like to use this system in. (with "#include <dialog>") You shouldn't mix normal ShowPlayerDialog functions with this system in the same script.
For a list of functions to use, as well as how to use them, please see dialog.inc.
OnDialogResponse should operate the same way it does usually. For checking which dialog was called, compare it to the ID received from CreateDialog.

What am I allowed to do with it?
Dialog Controller is licensed under the GNU General Public License. Please see COPYING in the download package, or http://www.gnu.org/licenses/gpl.html.

Where can I download it?
Right here - this also includes the source.
http://code.******.com/p/sa-mpdialog...1.0.0-full.zip (1.0.0 @ 08/08/10)
Please abide by the terms of the license!

Note: You should use isnull (included in dialog.inc) to check if inputtext is empty in OnDialogResponse. This is because CallRemoteFunction crashes when passing an empty string, so I had to make Dialog Controller pass \1. (which is detected properly with isnull)


Re: Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - Kevin_Joshen - 08.08.2010

First to reply!! THIS IS GRRRRREAT!


Re: Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - Carlton - 08.08.2010

Good work.


Re: Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - Kar - 08.08.2010

holy sh.. nice


Re: Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - Jake__ - 08.08.2010

Cool! I'm compiling <3


Re: Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - Calgon - 08.08.2010

Sweet. I've always made a major mess with my dialogs, might re-script this to my requirements and use this later. Nice one.


Re: Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - iZN - 08.08.2010

Damn, this is cool.


Re: Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - hab2ever - 08.08.2010

Awesome Work!


Respuesta: Dialog Controller - Dynamically create and show dialogs [1.0.0|08/08/10] - Jesus^ - 08.08.2010

Good work...