[HELP]How To create Dialog for Command /help ?? +REP +REP
#1

How To create Dialog for Command /help ??

+REP +REP
Reply
#2

Quote:
Originally Posted by WhiteAngels
Посмотреть сообщение
How To create Dialog for Command /help ??

+REP +REP
Код 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_HELP, DIALOG_STYLE_MSGBOX, "Server Help", str, "Close", "");
}
Note: If it didn't show all the text you made change

Код:
 new str[128];
to

Код:
new str[256]; or 512
Reply
#3

Quote:
Originally Posted by kbalor
Посмотреть сообщение
Код 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", "");
}
Note: If it didn't show all the text you made change

Код:
 new str[128];
to

Код:
new str[256]; or 512
where is the OnDialogResponse
Reply
#4

Quote:
Originally Posted by WhiteAngels
Посмотреть сообщение
where is the OnDialogResponse
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.







Код 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", "");
		}
          }
     }
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)