#1

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
Reply
#2

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?
Reply
#3

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)