06.11.2013, 06:19
I forgot on the top of your script
#define DIALOG_HELP 12345 //change the 12345 if you got some dialog conflict
No need of OnDialogResponse if you just want to show it be typing the command and hitting enter.
Or if you want it in OnDialogResponse we we should make LIST box first then after we will use MSGBOX.
#define DIALOG_HELP 12345 //change the 12345 if you got some dialog conflict
No need of OnDialogResponse if you just want to show it be typing the command and hitting enter.
Or if you want it in OnDialogResponse we we should make LIST box first then after we will use MSGBOX.
Код HTML:
#define DIALOG_MAINHELP 12345 #define DIALOG_HELP1 12346 #define DIALOG_HELP2 12347 #define DIALOG_HELP3 12348 #define DIALOG_HELP4 12349 #define DIALOG_HELP5 12350
Код HTML:
CMD:help(playerid, params[]) { ShowPlayerDialog(playerid, DIALOG_MAINHELP,DIALOG_STYLE_LIST,"Server Help","Help 1\nHelp2\nHelp3\Help4\nHelp5","Select","Close); return 1; }
Код HTML:
if ( dialogid == DIALOG_MAINHELP) { if ( !response ) return 1; if ( response ) { switch ( listitem ) { case 0: //Help 1 { ShowPlayerDialog(playerid, DIALOG_HELP1, DIALOG_STYLE_MSGBOX,"Help 1 ", "Put your Help 1 here", "Close", ""); } case 1: //Help 2 { ShowPlayerDialog(playerid, DIALOG_HELP2, DIALOG_STYLE_MSGBOX,"Help 2 ", "Put your Help 2 here", "Close", ""); } case 2: //Help 3 { ShowPlayerDialog(playerid, DIALOG_HELP3, DIALOG_STYLE_MSGBOX,"Help 3 ", "Put your Help 3 here", "Close", ""); } case 3: //Help 4 { ShowPlayerDialog(playerid, DIALOG_HELP4, DIALOG_STYLE_MSGBOX,"Help 4 ", "Put your Help 4 here", "Close", ""); } case 4: //Help 5 { ShowPlayerDialog(playerid, DIALOG_HELP5, DIALOG_STYLE_MSGBOX,"Help 5 ", "Put your Help 5 here", "Close", ""); } } } }