03.05.2016, 11:58
So I've built a script that takes money from the player and gives them ammo for their "paintballgun".
Basically how would i write out an if statement to put at the front of this part of code to make sure they have the correct amount of money to be able to purchase this item?
This is what i was thinking but I don't know what I should put there instead of "=="
I'd of course ad more for "if else' but I'm just confused about the first part of the checking the players money.
Cheers for any help.
Код:
SendClientMessage(playerid, White, "You have purchaused a Paint Rifle AMMO for $175"); GivePlayerMoney(playerid, -175); new ammo; ammo = GetPlayerAmmo(playerid); SetPlayerAmmo(playerid, 33, ammo+25);
This is what i was thinking but I don't know what I should put there instead of "=="
Код:
if(GetPlayerMoney == 175) SendClientMessage(playerid, White, "You have purchaused a Paint Rifle AMMO for $175"); GivePlayerMoney(playerid, -175); new ammo; ammo = GetPlayerAmmo(playerid); SetPlayerAmmo(playerid, 33, ammo+25);
Cheers for any help.