Quote:
Originally Posted by AlexMSK
PHP код:
if(dialogid == DIALOG_SHOPSTUFF)
{
if(response)
{
GivePlayerMoney(playerid, 24000000);
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Success!", "{24FB00}You successfully purchased this item", "Thanks!", "Close"); //used dialog id 0 as the dialog will be used simply for a message without function on it.
}
}
CMD:moneytest(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_SHOPSTUFF, DIALOG_STYLE_MSGBOX, "Game Shop" ,"{FFFFFF}Do you want to buy this item?\nItem: {FF0080}24 millions" , "Ok", "Close");
return 1;
}
You don't need all these dialog.
Please read the wiki: https://sampwiki.blast.hk/wiki/ShowPlayerDialog
And returning 0 will stop the function (Won't work). Please read: https://sampwiki.blast.hk/wiki/Control_Structures#return
|
There I redirect you, as he said to the wiki
https://sampwiki.blast.hk/wiki/OnDialogResponse
Actually, I do need those dialogs, that’s why I’m asking for help, because if I remove the last dialog, the function works correctly. As mentionned in the first post.