22.06.2018, 21:14
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;
}
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