Drop - 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: Drop (
/showthread.php?tid=240464)
Drop -
Ondracec - 15.03.2011
I need just Drop all weapons and money when die (0.3c)..
Thx.
Re: Drop -
austin070 - 15.03.2011
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new initmoney; //Makes player money a varible.
initmoney = GetPlayerMoney(playerid); Saves players money into a variable.
if(initmoney >0) { // If money is greater than 0
GivePlayerMoney(playerid, -initmoney); // Give player money -Initmoney (will set to 0)
}
return 1;
}
This will not reset debts, meaning if you have negative money and you die, you still have negative money.
Also, when you die, it should already make you lose weapons. If not, just add ResetPlayerWeapons(playerid); before the first "}".
Re: Drop -
Ondracec - 15.03.2011
I need that: drop money and weapon when die and stay on the ground same time and somebody can pickup them..
Re: Drop -
austin070 - 15.03.2011
Oh. Sorry, I misunderstood what you were asking for.