14.12.2016, 19:22
Quote:
OnPlayerWeaponShot's downside is that you can't see whether you're being damaged or not which makes it really unfitting for a custom damage system. That's why I resorted to a combination of SetPlayerTeam and OnPlayerTakeDamage. Players on the same team actually see that they are hit. OnPlayerTakeDamage needs to be called BEFORE the damage is applied, so a custom damage system can also prevent self-inflicted damage, not reverse it as it is right now.
Either return 0 under OnPlayerTakeDamage, or make a new callback "OnPlayerDamageReceived", I don't really care. |