23.02.2018, 13:30
You cannot rely directly on "OnPlayerTakeDamage" because of this (from wiki):
I'd say, if you really want to make a perfect serversided health/armour system, you need to implement server-sided damage first, similar to what my HitReg does.
And another big reason to not to use OnPlayerTakeDamage is that the hacker is the one who calls the callback, because he's taking damage, so the hack easily destroys the packet tobe sent and hence OPTD isn't called in your script.
Quote:
The amount is always the maximum damage the weaponid can do, even when the health left is less than that maximum damage. So when a player has 100.0 health and gets shot with a Desert Eagle which has a damage value of 46.2, it takes 3 shots to kill that player. All 3 shots will show an amount of 46.2, even though when the last shot hits, the player only has 7.6 health left. |
And another big reason to not to use OnPlayerTakeDamage is that the hacker is the one who calls the callback, because he's taking damage, so the hack easily destroys the packet tobe sent and hence OPTD isn't called in your script.