dialog control
#1

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
Reply
#2

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
Reply
#3

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!");
Reply
#4

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
Reply
#5

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
Reply
#6

update : figured it out ty for ya help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)