Next dialog box when i click OK
#1

Hello,
i want to make some thing like if a player type /commands then the first dialog box will come

pawn Код:
new string[1900];
    strcat(string, "Message", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Messages", string, "NEXT","Cancel");
And then if i press 'NEXT' then the next dialog box should come (cancel = close the dialog)

pawn Код:
new string[1900];
    strcat(string, "Message", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    strcat(string, "\nMessage", 1900 );
    ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Messages", string, "OK","Cancel");
How to make ?
Reply
#2

OnDialogResponse..
https://sampforum.blast.hk/showthread.php?tid=109610
here is a tutorial that will explain how to use OnDIalogResponse
Reply
#3

i didnt understand that, can you show me a simple example?
Reply
#4

anyone please help...
Reply
#5

The dialog tutorial explains it all , what don't you understand?
Reply
#6

i didnt understand, just an example please
Reply
#7

use used similar dialog ids just check the showplayerdialog(playerid, *id of the dialog* and see if its similar to another one
Reply
#8

you can request a code/script to be made on a section on the forums
Reply
#9

By telling this can you please show me a code?
Reply
#10

pawn Код:
new ondialog[MAX_PLAYERS];
//When they type /cmds
ondialog[playerid] = 0;
//under public OnDialogRespone
if(dialogid == 1)
{
    if(response)//They pressed next
    {
        switch(ondialog[playerid])
        {
            case 0:
            {
                ondialog[playerid]++;
                ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"COmmands",/*Message*/,"NEXT","EXIT");
            }
//and all other case
//for last dialog remove next button
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)