Dialog Show up - 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: Dialog Show up (
/showthread.php?tid=346771)
Dialog Show up -
iFederal - 29.05.2012
fixed
Re: Dialog Show up -
Jonny5 - 29.05.2012
i dont think the DIALOG_STYLE_MSGBOX type will call OnDialogResponse.
I had the same problem when trying something like this.
Re: Dialog Show up -
FalconX - 29.05.2012
Quote:
Originally Posted by Jonny5
i dont think the DIALOG_STYLE_MSGBOX type will call OnDialogResponse.
I had the same problem when trying something like this.
|
It will call OnDialogResponse
pawn Код:
if(dialogid == MSG_BOX_STYLE_ID) // dialog ID of the dialog which uses MSG box style
{
if(response) //BUTTON 1
{
//your code
}
else // BUTTON 2
{
//your code
}
}
Try that way and it will surely work and the "if(strlen(inputtext))" will only work with the following type of dialogs:-
- DIALOG_STYLE_INPUT
- DIALOG_STYLE_PASSWORD
Regards FalcoNX
Re: Dialog Show up -
mati233 - 29.05.2012
ShowPlayerDialog(playerid,
1111, DIALOG_STYLE_MSGBOX,"Terms and Roles.", DialogString,"Join","Exit");
if(dialogid ==
1234)
You're not using the same ID.
Re: Dialog Show up -
MP2 - 29.05.2012
You should use defines for dialog IDs, so you know what is what.
#define DIALOG_LOGIN 1
Re: Dialog Show up -
iFederal - 29.05.2012
Thanks, appreciated.