Dialog Next >> Button
#1

Could anyone show me how to continue the Dialog when I do press >> (or next dialog)

pawn Код:
CMD:cmds(playerid, params[])
{
    new str[256];
    strcat(str, "Basic Commands:\n\n");
    strcat(str, "/id \t\t-- \tSearch player ID using Player part name\n");
    strcat(str, "/pm \t\t-- \tSend private message to a player\n");
    strcat(str, "/pmo \t\t-- \tToggle PM enabled/disabled\n");
    ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", str, ">>", "Close");
    return 1;
}
So After I click >> This should show.
Код:
new str[256];
	strcat(str, "Player Commands:\n\n");
	strcat(str, "/asd \t\t-- \tSearch player ID using Player part name\n");
	strcat(str, "/adawd \t\t-- \tSend private message to a player\n");
then again another >>
Код:
new str[256];
	strcat(str, "Admin Commands\n\n");
	strcat(str, "/adawd \t\t-- \tSearch player ID using Player part name\n");
	strcat(str, "/awdawd \t\t-- \tSend private message to a player\n");
Then again >>
Код:
new str[256];
	strcat(str, "Vehicle Commands\n\n");
	strcat(str, "/ad \t\t-- \tSearch player ID using Player part name\n");
	strcat(str, "/adw\t\t-- \tSend private message to a player\n");
and last >>
Код:
new str[256];
	strcat(str, "Account Commands:\n\n");
	strcat(str, "/awd \t\t-- \tSearch player ID using Player part name\n");
	strcat(str, "/adwad \t\t-- \tSend private message to a player\n");
I need 5 DIALOG Next >> also support Back button..
Reply
#2

Top of your script
Код:
#define DIALOG_COMMANDS_2 999 // or any other number
#define DIALOG_COMMANDS_3 1000
#define DIALOG_COMMANDS_4 1001
in your OnDialogResponse
Код:
new str1[256] , str2[256] , str3[256] , str4[256];

// 1. dialog 
strcat(str1, "Player Commands:\n\n");
strcat(str1, "/asd \t\t-- \tSearch player ID using Player part name\n");
strcat(str1, "/adawd \t\t-- \tSend private message to a player\n");

// 2. dialog
strcat(str2, "Admin Commands\n\n");  
strcat(str2, "/adawd \t\t-- \tSearch player ID using Player part name\n");
strcat(str2, "/awdawd \t\t-- \tSend private message to a player\n");

// 3. dialog
strcat(str3, "Vehicle Commands\n\n");
strcat(str3, "/ad \t\t-- \tSearch player ID using Player part name\n");
strcat(str3, "/adw\t\t-- \tSend private message to a player\n");

// 4. dialog
strcat(str4, "Account Commands:\n\n");
strcat(str4, "/awd \t\t-- \tSearch player ID using Player part name\n");
strcat(str4, "/adwad \t\t-- \tSend private message to a player\n");

if(dialogid ==  DIALOG_COMMANDS) // if you use swtich ,just modfy it
{
   
    if(response) return ShowPlayerDialog(playerid , DIALOG_COMMANDS_2 ,DIALOG_STYLE_MSGBOX, "Commands", str2, ">>", "<<");
     return 1;
}


else if(dialogid ==  DIALOG_COMMANDS_2) // if you use swtich ,just modfy it
{  

    if(response) return ShowPlayerDialog(playerid , DIALOG_COMMANDS_3 ,DIALOG_STYLE_MSGBOX, "Commands", str3, ">>", "<<");  
     else return ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", str1, ">>", "Close");
  
}

else if(dialogid ==  DIALOG_COMMANDS_3) // if you use swtich ,just modfy it
{  

    if(response) return ShowPlayerDialog(playerid , DIALOG_COMMANDS_4 ,DIALOG_STYLE_MSGBOX, "Commands", str4, "<<", "Close");  
     else return ShowPlayerDialog(playerid, DIALOG_COMMANDS_2, DIALOG_STYLE_MSGBOX, "Commands", str2, ">>", "<<");
  
}

else if(dialogid ==  DIALOG_COMMANDS_4) // if you use swtich ,just modfy it
{  

    if(response) return ShowPlayerDialog(playerid , DIALOG_COMMANDS_3 ,DIALOG_STYLE_MSGBOX, "Commands", str3, "<<", ">>");  
     else return 1;
  
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)