21.05.2014, 07:20
Since 0.3z, the callbacks are called in such an order:
- OnPlayerWeaponShot - This is called first whenever a player shoots.
- OnPlayerGiveDamage - OnPlayerGiveDamage is being called when player gives damage. It gets called for the player when that player damages other player in-game. It doesn't mean that the damage had been received by the other player.
- OnPlayerTakeDamage - This is called whenever the player takes damage or when a damage is received. There can be a chance where HP may not be changed but through my experiences using this callback, it's always called when player takes damage or when a hit is synchronized.
If you're thinking about anti-health cheats, you must also make sure that HP related functions are always hooked. Otherwise you might encounter false detections.
- OnPlayerWeaponShot - This is called first whenever a player shoots.
- OnPlayerGiveDamage - OnPlayerGiveDamage is being called when player gives damage. It gets called for the player when that player damages other player in-game. It doesn't mean that the damage had been received by the other player.
- OnPlayerTakeDamage - This is called whenever the player takes damage or when a damage is received. There can be a chance where HP may not be changed but through my experiences using this callback, it's always called when player takes damage or when a hit is synchronized.
If you're thinking about anti-health cheats, you must also make sure that HP related functions are always hooked. Otherwise you might encounter false detections.