Dialog Response [HELP] -
Sting. - 30.07.2017
Well, firstly, I know how to create Dialogs, and use
OnDialogResponse. But what I want to ask is that I want to create a
command which players can use that shows
DIALOG_STYLE_PASSWORD where the player enters a password which I have set, for example
1234 and when the player enters the right code, the command will execute, otherwise it will show the
else message saying "Wrong Password". Well, I know how to create the Dialog, but for the output, I have no idea, how to set the password to be "1234", as you see,
OnDialogResponse, I read the input for password/msgbox (at Wiki) but have no idea how to set a specific password like "1234" for example. Can anyone provide me the
OnDialogResponse for a specific pass like "1234" and I will take care of the
else output.
Another Out of Topic question I had is, that I have a command, which
ForceClassSelection of the player, but my question is, do I have to set a
Virtual World? . See, OnPlayerConnect, I have already set a virtual world, ex.1 and then for OnPlayerSpawn, I've set a virtual world to ex.0 . So is it necessary or just leave it?
+REP for those who help me resolve this issues of doubt. Thanks in advance.
Re: Dialog Response [HELP] -
Shinja - 30.07.2017
PHP код:
if(!response) // something
else
{
if(!strcmp(inputtext, "1234")) // player entered 1234
else // didnt enter 1234
}
return 1;
And no, you dont have to set virtual world again
Re: Dialog Response [HELP] -
Sting. - 30.07.2017
Yea, that figures for the virtual world, cause usually when I use the command to go back to class selection, it becomes brighter.... Like the world is brighter or something. Can't explain anyway. But thanks. Much appreciated.