SA-MP Forums Archive
Need dialogs help ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need dialogs help ! (/showthread.php?tid=627945)



Need dialogs help ! - Deny1 - 03.02.2017

Hello everebody, i want to figure how to make dialogs show after dialog, example if i define dialog_test
and make cmd like this
PHP код:
CMD:test(playeridparams[])
{
    
ShowPlayerDialog(playeridDIALOG_TESTDIALOG_STYLE_MSGBOX"TEST""TESTr""Close""");
    return 
1;

I put under OnDialogResponse
PHP код:
if(dialogid == 1
    {
    
ShowPlayerDialog(playeridDIALOG_TESTDIALOG_STYLE_MSGBOX"TEST""TESTr""Close""");
    } 
Does i go in right way?and I mean when command show me this dialog and i click close to open me another dialog it isn't matter witch...


Re: Need dialogs help ! - AndreiWow - 03.02.2017

Did you atleast try it? Yes it will open you the next dialog if you put it in the dialog response.


Re: Need dialogs help ! - Deny1 - 03.02.2017

Look how can i make under OnDialogResponse if dialog id 1 resposne to open dialog id number 2 and when i close dialog id 2 to automaticly open dialog 3


Re: Need dialogs help ! - AndreiWow - 03.02.2017

Put this at the top

Rename them as you need
PHP код:
#define DIALOG_NAME1 //dialog1
#define DIALOG_NAME2 //dialog2
#define DIALOG_NAME3 //dialog3 
OnDialogResponse
PHP код:
switch (dialogid)
{
     case 
DIALOG_NAME1:
      {
         if(
response)//if player press on the left button
          
ShowPlayerDialog...//dialog2
      
}
     case 
DIALOG_NAME2:
     {
       if(
response)//if player press on the left button
       
ShowPlayerDialog...//dialog3
      
}




Re: Need dialogs help ! - Deny1 - 03.02.2017

Yes, it show only first 2 dialogs not third(dialog 3)..


Re: Need dialogs help ! - Deny1 - 03.02.2017

PHP код:
if(dialogid == 1)
    {
        switch (
dialogid)
        {
            case 
DIALOG_TEST:
            {
            if(
response)//if player press on the left button
            
ShowPlayerDialog(playeridDIALOG_TEST3DIALOG_STYLE_MSGBOX"Notice""222222""22""22");
            }
            case 
DIALOG_TEST2:
           {
           if(
response)//if player press on the left button
           
ShowPlayerDialog(playeridDIALOG_TEST3DIALOG_STYLE_MSGBOX"Notice""33333""333""33");
           }
    }
    } 



Re: Need dialogs help ! - AndreiWow - 03.02.2017

Quote:
Originally Posted by Deny1
Посмотреть сообщение
PHP код:
if(dialogid == 1)
    {
        switch (
dialogid)
        {
            case 
DIALOG_TEST:
            {
            if(
response)//if player press on the left button
            
ShowPlayerDialog(playeridDIALOG_TEST3DIALOG_STYLE_MSGBOX"Notice""222222""22""22");
            }
            case 
DIALOG_TEST2:
           {
           if(
response)//if player press on the left button
           
ShowPlayerDialog(playeridDIALOG_TEST3DIALOG_STYLE_MSGBOX"Notice""33333""333""33");
           }
    }
    } 
DIALOG_TEST:
PHP код:
 ShowPlayerDialog(playeridDIALOG_TEST2DIALOG_STYLE_MSGBOX"Notice""222222""22""22"); 
You used DIALOG_TEST3 at both cases...

In first case use DIALOG_TEST2 like I did above.


Re: Need dialogs help ! - Deny1 - 04.02.2017

it doesn't show again..


Re: Need dialogs help ! - Deny1 - 04.02.2017

someone help?


Re: Need dialogs help ! - Deny1 - 05.02.2017

BUMP