Select/Cancel in a DIALOG_STYLE_LIST
#1

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

pawn Код:
ShowPlayerDialog(playerid, DUTYMENU2, DIALOG_STYLE_LIST, "LSPD Weapons","Mase\nKnite Stick\nDeagle\nSpas12\nMP5\nM4\nAK-47\nGranade\nSmoke Bomb\nC4", "Select", "Cancel");
Reply
#3

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.
Reply
#4

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

Ahk i see, by mod shop do you mean like transvender or arch wheels. or have you made a custom one or something.
Reply
#6

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

Thank you SOOOOOOOOO much! I was wasting my time trying to fix it thanks heaps.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)