Money goes under the zero
#1

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?
Reply
#2

When the money goes under 0, set it to 0.
Reply
#3

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

help
Reply
#5

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)
Reply
#6

SetPlayerMoney?

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

Work! THX!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)