22.09.2013, 16:19
You need to enter a dialogid. It requires a integer such as 1,2,87 etc.
Example you're using this.
In this code your dialogid 4 is the msgbox. If you want to do something with OnDialogResponse you need to enter this 4 for MSGBOX, when the player press OK.
But there is a easy way to keep the ID's on your mind. In fact definition of Dialog IDs.
Now you can use this definition instead of 4.
Example.
Example you're using this.
pawn Код:
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_MSGBOX, "Hello", "This is a Dialog.", "OK", "");
pawn Код:
if(dialogid == 4)
pawn Код:
#define DIALOG_MSG 4
Example.
pawn Код:
if(dialogid == DIALOG_MSG)