SA-MP Forums Archive
from dialog to dialog - 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: from dialog to dialog (/showthread.php?tid=602665)



from dialog to dialog - saffierr - 11.03.2016

How do I go from dialog to dialog? example:
PHP код:
CMD:bla(playeridparams[])
{
   
ShowPlayerDialog(playeriddialog1bla"bla""bla""button1""button2");
   return 
1;

How do I go from dialog1 to dialog2 when clicking on button1?
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if(
dialogid==dialog1 && response==1)
{
   switch(
listitem)
   {
       case 
0:
       {
           
ShowPlayerDialog(playeriddialog2bla"bla""bla""button1""button2");
           switch(
listitem)
           case 
0:
           {
                
// Something like this?
           
}
       }
   }
}
return 
1;

I hope I could explain it well.

---
How do you go from dialog1 to dialog2 by clicking button1 on dialog1


Re: from dialog to dialog - zPain - 11.03.2016

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]) {
    if(
dialogid == dialog1) {
        if(
response) {
            
ShowPlayerDialog(playeriddialog2bla"bla""bla""bla""bla");
        }
        return 
1;
    }
    return 
0;




Re: from dialog to dialog - Abagail - 11.03.2016

There is no seperate procedure for showing another dialog. Showing another one while another is active will overwrite the current one. Note that OnDialogResponse automatically closes out the dialog, you may reshow it manually when needed.


Re: from dialog to dialog - Joron - 11.03.2016

Quote:
Originally Posted by Abagail
Посмотреть сообщение
There is no seperate procedure for showing another dialog. Showing another one while another is active will overwrite the current one. Note that OnDialogResponse automatically closes out the dialog, you may reshow it manually when needed.
Yes,but the above code should work.


Re: from dialog to dialog - saffierr - 11.03.2016

nvm, fixed it. thanks anyways