OnPlayerDeath
#1

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.
Reply
#2

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 }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)