SA-MP Forums Archive
dialog control - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: dialog control (/showthread.php?tid=240289)



dialog control - hadzx - 15.03.2011

how do i control the buttons on the dialog like


"Select" "Cancel"

because this server had a teleport dialog like this


"Stunts"
"Jumps"

"Select "Close"

and if you click one it has

"Stunt 1"

"Select" "Back"

thanks


Re: dialog control - randomkid88 - 15.03.2011

pawn Код:
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[])
Then use OnDialogResponse to show another dialog.

You want to use DIALOG_STYLE_LIST for the list. Read the wiki for this, it should explain everything you need to know


Re: dialog control - hadzx - 15.03.2011

no i ment like

control the dialog so

when you click close or back you can do something on it

example

close

sendclientmessage(playerid,0xFFFFFFFF,"you closed the menu");


and back

sendclientmessage(playerid,0xFFFFFFFF,"Main Menu!");


Re: dialog control - randomkid88 - 15.03.2011

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
if(dialogid == /*ID of the dialog you want to control*/)
{
     if(response)//Checks to see if Button1 was pressed.
     {
         //Do something
     }
     else
     {
          //Do something else
     }
}
https://sampwiki.blast.hk/wiki/OnDialogResponse


Re: dialog control - hadzx - 15.03.2011

Quote:
Originally Posted by randomkid88
Посмотреть сообщение
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
if(dialogid == /*ID of the dialog you want to control*/)
{
     if(response)//Checks to see if Button1 was pressed.
     {
         //Do something
     }
     else
     {
          //Do something else
     }
}
https://sampwiki.blast.hk/wiki/OnDialogResponse
i tryed that earlier but it controls every single dialog other button


Re: dialog control - hadzx - 15.03.2011

update : figured it out ty for ya help