Entity/Health

From Garry's Mod
Jump to: navigation, search
 Entity:Health( )

Contents

Description

Returns the health of the entity.

Returns

number

health

Examples

Example

Prints if the entity's health is at full or more.

print( Entity( 1 ):Health() >= Entity( 1 ):GetMaxHealth() )

Output:

"true" entity's health is greater than or equal to their max health, or "false" otherwise.
Personal tools
Navigation