12.01.2013, 13:35
You should post here https://sampforum.blast.hk/showthread.php?tid=187229&page=327 if you want code given to you, although I'll provide an example for you and explain how and why.
OnPlayerDeath, you'll need to get the players money and store it in a variable
Then you'll need to subtract a percent of that - let's say you want to subtract 5% of the players money on death, you'd do something like this:
And there you have it.
OnPlayerDeath, you'll need to get the players money and store it in a variable
pawn Код:
//example var
new
playerMoney;
pawn Код:
playerMoney = GetPlayerMoney( playerid );
GivePlayerMoney( playerid, ( -( playerMoney * 0.05 ))); // - for subtraction.