Money HELP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Money HELP (
/showthread.php?tid=378911)
Money HELP -
necrobg3 - 19.09.2012
Hey guys. I was wondering how to make the money when get under 0 ( example: money = -1 ) to say: ERROR: You don't have money for this.
+REP for the dude who help me.
Re: Money HELP -
detter - 19.09.2012
Код:
if(GetPlayerMoney(playerid) < 0 ) return SendClientMessage(playerid ,COLOR ,"You don't have enough money!");
Re: Money HELP -
necrobg3 - 19.09.2012
Thanks. +REP
Re: Money HELP -
necrobg3 - 20.09.2012
But now when i have 0 money and buy it i get on -20000 and when i type it again it show that message. I want to make the player money to don't go under 0.
Re: Money HELP -
antonio112 - 20.09.2012
How about checking if the player has less money than he needs. Example:
pawn Код:
new pMoney = GetPlayerMoney(playerid);
if(pMoney < vSellPrice)
return SendClientMessage(playerid, -1, "You don't have enough money to buy the vehicle.");
This is just an example, you must change the variables with yours.
Re: Money HELP -
clarencecuzz - 20.09.2012
pawn Код:
if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, 0xFF0000FF, "You Don't Have Enough Money To Purchase This.");
Re: Money HELP -
necrobg3 - 20.09.2012
Thanks.