Garry's Mod Wiki

GM:PostEntityTakeDamage

  GM:PostEntityTakeDamage( Entity ent, CTakeDamageInfo dmginfo, boolean wasDamageTaken )

Description

Called when an entity receives a damage event, after passing damage filters, etc.

See GM:EntityTakeDamage if you wish to prevent damage events, or otherwise alter them.

Applying damage from this hook to the entity taking damage will lead to infinite loop/crash.

Arguments

1 Entity ent
The entity that took the damage.
2 CTakeDamageInfo dmginfo
Detailed information about the damage event.
3 boolean wasDamageTaken
Whether the entity actually took the damage. (For example, shooting a Strider will generate this event, but it won't take bullet damage).