16.04.2015, 14:12
If you just want to close the dialog box after pressing that button or pressing Esc, then don't write anything for that dialog in OnDialogResponse.
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
If you leave the button2 parameter as "", there will be only one button. So, you can write the button1 as "Close" and there will be only one button called "Close" will be shown.
Here's an example:
PHP код:
native ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
If you leave the button2 parameter as "", there will be only one button. So, you can write the button1 as "Close" and there will be only one button called "Close" will be shown.
Here's an example:
PHP код:
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_LIST, "Hello", "Hi,\nHow are you?", "Close", "");