SA-MP Forums Archive
Money goes under the zero - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Money goes under the zero (/showthread.php?tid=80796)



Money goes under the zero - steven_italy - 06.06.2009

Hi guyz. I modified the gamemode SFTDM and i set that if you kill someone you earn 3000, if you die you lose 2500. If you die and have 0$, you will have -2500. How to set that if you die you can't go to minus cash?


Re: Money goes under the zero - MenaceX^ - 06.06.2009

When the money goes under 0, set it to 0.


Re: Money goes under the zero - steven_italy - 06.06.2009

Quote:
Originally Posted by MenaceX^
When the money goes under 0, set it to 0.
ye...where and how?


Re: Money goes under the zero - steven_italy - 06.06.2009

help


Re: Money goes under the zero - SiJ - 06.06.2009

I don't know where exactly you have to put it but here:
pawn Код:
new plmoney = GetPlayerMoney(playerid);
if(plmoney < 0)
{
SetPlayerMoney(playerid,0);
}
I think it should be under public OnPlayerInfoChange(playerid)


Re: Money goes under the zero - miokie - 06.06.2009

SetPlayerMoney?

OnPlayerDeath:
pawn Код:
if(GetPlayerMoney(playerid) < 0) return ResetPlayerMoney(playerid);
Something along the lines of that. Im sure it'd work.


Re: Money goes under the zero - steven_italy - 07.06.2009

Work! THX!