Dialog Question - 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: Dialog Question (
/showthread.php?tid=160589)
Dialog Question -
br0adyb0ii - 17.07.2010
Is it possible you have to enter a password before you see the dialogs menu (for a police computer in game)
Re: Dialog Question -
Grim_ - 17.07.2010
Can you explain more please. If I understand, you could just use a variable and timer. Set the variable to 1 if the player has entered the password, and in the timer if the variable equals 1, show the dialog.
Re: Dialog Question -
br0adyb0ii - 17.07.2010
ok you do a command /pdc and then a dialog comes up telling you to enter a password to access the menu. you can either click ok or denie and once you enter the pass you will see the full menu eg
/imageshack/f/samp001ff.png
Re: Dialog Question -
Grim_ - 17.07.2010
Something like this then:
pawn Код:
if(!strcmp(cmdtext, "/pdc", true))
{
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_INPUT, "Please enter the password", "Submit", "Deny");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 10)
{
if(!strcmp(inputtext, "Yourpasshere", true))
{
ShowPlayerDialog(/*The other dialog with the interiors*/);
}
return 1;
}
return 1;
}
Re: Dialog Question -
br0adyb0ii - 17.07.2010
yeah like that thanks if i have more questions ill post here