Posts: 70
Threads: 23
Joined: Nov 2010
Reputation:
0
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?
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
Losing money by default? No, you lose money only if in OnPlayerDeath callback, you take -100. Search to your gamemode and filterscripts.
Posts: 499
Threads: 4
Joined: Apr 2013
Reputation:
0
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.