22.06.2018, 19:38
(
Последний раз редактировалось Adamoneoone; 22.06.2018 в 20:18.
)
Hello, i'm trying to make a dialog, but when I press "Ok", nothing happens...
I did return 0 at the end of OnDialogResponse
There is my dialog code:
However, when I paste all the above in a single command, everything works...
Has anybody got an idea?
Thanks in advance!
// EDIT
Also forgot to mention that, if I don't use the DIALOG_MONEY and put its content directly into DIALOG_SHOPSTUFF case 6 it works.
I did return 0 at the end of OnDialogResponse
There is my dialog code:
Код:
if(dialogid == DIALOG_SHOP) { switch(listitem) { case 0: { ShowPlayerDialog(playerid, DIALOG_SHOPSTUFF,DIALOG_STYLE_LIST, "Game Shop" , "{FFFFFF}Game Money\nstuff2add", "Select", "Close"); } } }
Код:
if(dialogid == DIALOG_SHOPSTUFF) { switch(listitem) { case 6: { ShowPlayerDialog(playerid, DIALOG_MONEY, DIALOG_STYLE_MSGBOX, "Game Shop" ,"{FFFFFF}Do you want to buy this item?\nItem: {FF0080}24 millions" , "Ok", "Close"); } } }
Код:
if(dialogid == DIALOG_MONEY) { if(response) { GivePlayerMoney(playerid, 24000000); ShowPlayerDialog(playerid, DIALOG_SUCCESS, DIALOG_STYLE_MSGBOX, "Success!", "{24FB00}You successfully got some cash", "Thanks!", "Close"); } }
Код:
CMD:moneytest(playerid, params[]) { GivePlayerMoney(playerid, 24000000); ShowPlayerDialog(playerid, DIALOG_SUCCESS, DIALOG_STYLE_MSGBOX, "Success!", "{24FB00}You successfully purchased this item", "Thanks!", "Close"); return 1; }
Thanks in advance!
// EDIT
Also forgot to mention that, if I don't use the DIALOG_MONEY and put its content directly into DIALOG_SHOPSTUFF case 6 it works.