Losing $100 on death
#1

Alright, so there's this little problem. The player loses $100 on death by default, and I don't want that to happen. Mostly the solution is to give the player 100 when he dies, but then another problem shows up. You see, if the player has less than $100 and he dies, he will only go to 0, he will not go to minus. This means that if I die having $50, I will go to $0 and then go to $100. This means that I can receive more money by dying. Anyone know how to solve this problem?
Reply
#2

Losing money by default? No, you lose money only if in OnPlayerDeath callback, you take -100. Search to your gamemode and filterscripts.
Reply
#3

Just use GetPlayerMoney(playerid) maybe on OnPlayerUpdate, and store it in a variable, to use it on OnPlayerDeath.
First check if the variable contains a value less than $100, and use GivePlayerMoney(playerid, variablename);
I think you will solve it this way.
Reply
#4

Quote:
Originally Posted by ******
Посмотреть сообщение
Actually, you do loose money by default.
I used server-side money and that's why I did not loose in any of my scripts.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)