Garry's Mod Wiki

Entity:TakeDamage

  Entity:TakeDamage( number damageAmount, Entity attacker, Entity inflictor )

Description

Applies the specified amount of damage to the entity with DMG_GENERIC flag.

Calling this function on the victim entity in ENTITY:OnTakeDamage can cause infinite loops.
This function does not seem to do any damage if you apply it to a player who is into a vehicle.

Arguments

1 number damageAmount
The amount of damage to be applied.
2 Entity attacker
The entity that initiated the attack that caused the damage.
3 Entity inflictor
The entity that applied the damage, eg. a weapon.