Quick question about checking players money
#1

So I've built a script that takes money from the player and gives them ammo for their "paintballgun".

Код:
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);
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 "=="
Код:
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);
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.
Reply


Messages In This Thread
Quick question about checking players money - by ImToro - 03.05.2016, 11:58
Re: Quick question about checking players money - by cdoubleoper - 03.05.2016, 12:01
Re: Quick question about checking players money - by ImToro - 03.05.2016, 12:03
Re: Quick question about checking players money - by cdoubleoper - 03.05.2016, 12:04
Re: Quick question about checking players money - by Vince - 03.05.2016, 13:33

Forum Jump:


Users browsing this thread: 1 Guest(s)