Quote:
Originally Posted by Teneckz
try this ...
pawn Код:
if(dialogid == STORE_DIALOG) { if(response == 0) { ShowPlayerDialog(playerid,STORE_DIALOG,DIALOG_STYLE_LIST,"24/7 STORE","Chainsaw ($1500)\nFlowers ($5)\nBaseball bat ($100)\nBeer ($20)\nWallet ($1000)\nParachute($500)\nCork($1000)","Choose","Cancel"); } if(response) { if(listitem == 0) { if(GetPlayerMoney(playerid) <= 1499) { SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase Failed_|"); SendClientMessage(playerid, COLOR_ERROR, "You cannot afford to buy a Chainsaw ($1500)"); return 1; } GivePlayerMoney(playerid,-1500); SendClientMessage(playerid, 0xA9A9A9AA, "|_24/7 Purchase_|"); SendClientMessage(playerid, 0x00C7FFAA, "You have bought a Chainsaw. You were charged $1500"); GivePlayerWeapon(playerid,9,1); return 1; } } return 1; }
|
That didn't fix it, That just made it so if I press "cancel" it doesn't close the dialog.
I need it so if i press cancel, it closes the dialog. But when i press cancel with my normal code it says "cannot afford to buy a chainsaw"