Dialogs Problem
#1

hey guys, i made a Dialog like /shop in game, which allows people to buy stuff, but the problem i see is when people hit Ok they buy a weapon, but even if they hit cancel they buy a weapon, can you help?
Reply
#2

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

The 'response' tells you what button they pressed.
1 for first button and 0 for second button

So if Ok is the first button and Cancel is the 2nd button you could do like:

if(response == 0) return 1;


Source: https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)