YSI - 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: YSI (
/showthread.php?tid=665133)
YSI -
minimessi10 - 23.03.2019
Hello
I'm relatively new using YSI. I would like to know how I can load xml (with y_xml) and load the information into a dialog (with y_dialogs)?
Thanks <3
Re: YSI -
minimessi10 - 23.03.2019
The result I want to achieve is similar to reading text using y_text. The idea would be to create xml files with dialog information like title, text, buttons and load them at server startup (similar to this
https://sampforum.blast.hk/showthread.php?tid=570943). Would you give it to use with y_languages as well?
Re: YSI -
minimessi10 - 23.03.2019
Exemple:
Код:
// File: dialog_login.xml
<dialog type="password">
<title>Login</title>
<text>Inform your password</text>
<button>Login</button>
<button>Cancel</button>
</dialog>
So the code would look something like:
Код:
new DialogLogin;
public OnGameModeInit() {
DialogLogin = loadXmlForDialog("dialog_login.xml");
return 1;
}
//...
ShowDialog(DialogLogin);