Garry's Mod Wiki

Entity:GetMaxHealth

  number Entity:GetMaxHealth()

Description

Returns the max health that the entity was given. It can be set via Entity:SetMaxHealth.

Returns

1 number
Max health.

Example

Prints the maximum health set for player 1.

print( Entity( 1 ):GetMaxHealth() )
Output: By default, 100.