onPlayerTakeDamage
#7

I can think of two ways to make this but you will have to script them yourself.

#1: If you want to fix that player dies when you fall from high, you gotta check for animations. If player has the falling animation, set the timer and set his health to Float:0x7F800000. When the animation will stop kill the timer and set players health to 100 or to what it was before player fell. If this method is not going to work, use MapAndreas plugin or include and set players pos to the ground to prevent him from falling.

#2: This way is a bit of noticeable but will work. When player dies, get his current position and set a death variable to true. After, under OnPlayerSpawn, if death variable is true, set players pos to where he died. This is tricky and if you have stats system, you will need variable for death so other statements won't not be counting or whatever.

Good luck.

EDIT: You will still need to use the OnPlayerTakeDamage callback for both methods.

Also, I'm not sure if you can somehow return 0 under OnPlayerDeath callback, don't know what will happen but once you start scripting, test it as well besides to what you actually going to script. If it would work like this, it would of prevent from the rest of the code being executed.
Reply


Messages In This Thread
onPlayerTakeDamage - by audriuxxx - 25.12.2013, 19:59
Re: onPlayerTakeDamage - by Jefff - 25.12.2013, 20:05
Re: onPlayerTakeDamage - by SilentSoul - 25.12.2013, 20:05
Re: onPlayerTakeDamage - by audriuxxx - 25.12.2013, 20:15
Re: onPlayerTakeDamage - by Jefff - 25.12.2013, 20:20
Re: onPlayerTakeDamage - by audriuxxx - 25.12.2013, 20:23
Re: onPlayerTakeDamage - by Cypress - 25.12.2013, 20:34

Forum Jump:


Users browsing this thread: 1 Guest(s)