SA-MP Forums Archive
Cash decrease when respawn - 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: Cash decrease when respawn (/showthread.php?tid=75125)



Cash decrease when respawn - Robbin237 - 29.04.2009

When you died, and respawn, your cash will be like this:

Before death: 10000
After death: 9900

Means theres 100 dollars gone. I can't find anywhere in all my scripts where theres a line that gives you -100 cash.. Is this scripted into SA-MP if yes, how do we fix it?

Thnx


Re: Cash decrease when respawn - Andom - 29.04.2009

I hate it to, very anoying! try this:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  GivePlayerMoney(playerid, 100);
  return 1;
}
-100 + 100 = 0

So if you have 10.000 and you die, you will get -100, then +100, and you have 10.000 in total.


Re: Cash decrease when respawn - Robbin237 - 29.04.2009

Thanx, but im wondering if there is another way, since now its even more anoying that its decreasing and then INCREASING the amount :P


Re: Cash decrease when respawn - member - 29.04.2009

I had that exact same problem as well lol. I searched all my code, removed filterscripts one-by-one, tried different combinations etc and still couldn't find it.

I found that the only fix for that was to add GivePlayerMoney(playerid, 100); under OnPLayerDeath, as Andom had mentioned above.
That should sort it out, but i'm frustrated as to where this suddenly came from.