SA-MP Forums Archive
OnPlayerDeath - 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)
+--- Thread: OnPlayerDeath (/showthread.php?tid=475113)



OnPlayerDeath - Dynamic - 11.11.2013

Hey, I am working on a sort of heavily injured mode which should enforce once a player got beaten or shot to death, then the player should spawn at the old location (Which I already got working)

Although what I wonder is, how do I make this happen once after death? I want to make a player re-spawn with 20Hp and if getting executed then the player should spawn at home for example.


Re: OnPlayerDeath - Pottus - 11.11.2013

Just make a new variable.....

bool:BeingExecuted[MAX_PLAYERS];

Then set that to true when a player dies then....

SpawnPlayer()

Under OnPlayerSpawn()

if(BeingExecuted[playerid]) { // Do your shit }