PDA

View Full Version : OnPlayerTakeDamage/OnPlayerGiveDamage


audriuxxx
16/05/2014, 07:51 PM
Hi,

I'am using this both callback's.

I want to ask:

Which callback will be called first, when somebody shoot to somebody?

If i set player health, and then in other callback getplayerhealth, i get that health which i set or that health, what player have

ball
16/05/2014, 08:24 PM
First will be called OnPlayerGiveDamage

audriuxxx
16/05/2014, 08:36 PM
You test it?

Pottus
16/05/2014, 10:47 PM
Depends, sometimes OnPlayerGiveDamage() won't be called at all but it will always call first if it is called. I'll be honest with you however, OnPlayerTakeDamage() is completely useless when it comes to bullet damage a proper damage system should only use OnPlayerGiveDamage() the new lag comp is unreliable so you should have a skin hit system which uses OnPlayerGiveDamage() and issues the damage. Of course you will still need OnPlayerTakeDamage() to detect fall damage etc.