Select/Cancel in a DIALOG_STYLE_LIST - 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: Select/Cancel in a DIALOG_STYLE_LIST (
/showthread.php?tid=206532)
Select/Cancel in a DIALOG_STYLE_LIST -
r3k1lLz_ - 04.01.2011
Hey,
As you can see in the subject, can someone give me an example of how to do this?
I really need this for my Mod Shop
Re: Select/Cancel in a DIALOG_STYLE_LIST -
Ironboy - 04.01.2011
pawn Код:
ShowPlayerDialog(playerid, DUTYMENU2, DIALOG_STYLE_LIST, "LSPD Weapons","Mase\nKnite Stick\nDeagle\nSpas12\nMP5\nM4\nAK-47\nGranade\nSmoke Bomb\nC4", "Select", "Cancel");
Re: Select/Cancel in a DIALOG_STYLE_LIST -
Haydz - 04.01.2011
You will need ShowPlayerDialog when a player enters the mod shop.
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Then use OnDialogResponse.
https://sampwiki.blast.hk/wiki/OnDialogResponse ,Theres also an example on the wiki pages if you need them.
Re: Select/Cancel in a DIALOG_STYLE_LIST -
r3k1lLz_ - 04.01.2011
I mean when the player enters the mod shop I already got that showplayerdialog thing but I made it so it shows a camera in the mod shop at their car and I wanted it so if they press cancel it makes them controllable and camera behind them
Re: Select/Cancel in a DIALOG_STYLE_LIST -
Haydz - 04.01.2011
Ahk i see, by mod shop do you mean like transvender or arch wheels. or have you made a custom one or something.
Re: Select/Cancel in a DIALOG_STYLE_LIST -
Kwarde - 04.01.2011
put this in OnDialogResponse:
pawn Код:
if(dialogid == ID) //Replace 'ID' with the dialogid you used
{
if(!response){
//Put here what you want, if they use cancel
}
else{
//Put here what happens if they press OK
}
}
Re: Select/Cancel in a DIALOG_STYLE_LIST -
r3k1lLz_ - 04.01.2011
Thank you SOOOOOOOOO much! I was wasting my time trying to fix it thanks heaps.