06.11.2013, 05:37
How To create Dialog for Command /help ??
+REP +REP
+REP +REP
CMD:help(playerid, params[]) { new str[128]; strcat(str,"Welcome to my server \n\n\nPut your help title here\n\n/HELP1\nHELP2\nHELP3\nHELP4\n"); strcat(str,"HELP5\nHELP6\nHELP7\nHELP8\nHELP9\nHELP10"); ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Server Help", str, "Close", ""); }
new str[128];
new str[256]; or 512
Код HTML:
CMD:help(playerid, params[]) { new str[128]; strcat(str,"Welcome to my server \n\n\nPut your help title here\n\n/HELP1\nHELP2\nHELP3\nHELP4\n"); strcat(str,"HELP5\nHELP6\nHELP7\nHELP8\nHELP9\nHELP10"); ShowPlayerDialog(playerid, DIALOG_RULES, DIALOG_STYLE_MSGBOX, "Server Help", str, "Close", ""); } Код:
new str[128]; Код:
new str[256]; or 512 |
#define DIALOG_MAINHELP 12345 #define DIALOG_HELP1 12346 #define DIALOG_HELP2 12347 #define DIALOG_HELP3 12348 #define DIALOG_HELP4 12349 #define DIALOG_HELP5 12350
CMD:help(playerid, params[]) { ShowPlayerDialog(playerid, DIALOG_MAINHELP,DIALOG_STYLE_LIST,"Server Help","Help 1\nHelp2\nHelp3\Help4\nHelp5","Select","Close); return 1; }
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", ""); } } } }