Buy Snack doesn't work?
#1

When I go into the gas station in Los Santos next to Well Stacked Pizza and LS Airport, I want to get a snack. But each time I want to buy, it says I don't have enough money when I have more than enough.

Here's my code:

Код:
		if(listitem == 1)
		{
		    if(pcash < 500)
		    {
		        SendClientMessage(playerid, COLOR_ERROR, "You do not have enough money to buy a snack.");
		        return 1;
			}
			SetPVarInt(playerid, "HasSnacks", GetPVarInt(playerid, "HasSnacks") +1);
			GivePlayerMoney(playerid, -500);
			SendClientMessage(playerid, COLOR_BLUE, "[ITEM BOUGHT] Snack: $500.");
			SendClientMessage(playerid, COLOR_BLUE, "This item will restore your health by 10 by using /snack");
			return 1;
		}
Ignore the "HasSnacks" as that doesn't come up. It says it's $500 but I have $15000. How come it still says "You do not have enough money to buy a snack."?
Reply


Messages In This Thread
Buy Snack doesn't work? - by TheMightyEddy - 31.03.2012, 19:18
Re: Buy Snack doesn't work? - by TheMightyEddy - 31.03.2012, 19:49
Re: Buy Snack doesn't work? - by TheMightyEddy - 31.03.2012, 21:27
Re: Buy Snack doesn't work? - by introzen - 31.03.2012, 21:31
Re: Buy Snack doesn't work? - by Catalyst- - 31.03.2012, 21:38
Re: Buy Snack doesn't work? - by MickeyB - 31.03.2012, 21:50

Forum Jump:


Users browsing this thread: 1 Guest(s)