[Tutorial] How to prevent damage
#3

Quote:
Originally Posted by Wolfe
Посмотреть сообщение
Couldnt you just OnPlayerGiveDamage just set all the weapon values to give 0 damage? lol
No, there's no way to do that.
You can only reverse the damage by putting his health back when he's hit, but apart from OnPlayerWeaponShot the callbacks are only called afterwards as mentioned.
Quote:

player A with 30.0HP gets hit by another player B using a sniper rifle which does about 49.0 damage. In the case of OnPlayerTakeDamage, player A would die. Why? Because the damage is applied first, resulting in -19.0HP

Reply


Messages In This Thread
How to prevent damage - by Manyula - 04.05.2016, 10:47
Re: How to prevent damage - by Wolfe - 04.05.2016, 11:54
Re: How to prevent damage - by CalvinC - 04.05.2016, 12:14
Re: How to prevent damage - by Wolfe - 04.05.2016, 12:17
Re: How to prevent damage - by F1N4L - 04.05.2016, 12:25
Re: How to prevent damage - by CalvinC - 04.05.2016, 12:33
Re: How to prevent damage - by F1N4L - 04.05.2016, 12:45
Re: How to prevent damage - by SyS - 04.05.2016, 14:45
Re: How to prevent damage - by Manyula - 04.05.2016, 16:19

Forum Jump:


Users browsing this thread: 3 Guest(s)