PDA

View Full Version : OnPlayerDeath


Dynamic
11/11/2013, 01:34 PM
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.

Pottus
11/11/2013, 01:37 PM
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 }