Garry's Mod Wiki

Entity:TakeDamage

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

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 driving a prop_vehicle_jeep or prop_vehicle_jeep_old vehicle. You need to call it on the vehicle instead.

Arguments

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