Entity.GetMaxHealth
From GMod Wiki
| Function | |
| Syntax | Entity:GetMaxHealth( ) |
| Description: | |
| Returns the maximum amount of health the entity can have. | |
| Returns: | Integer |
| In Object: | Entity |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.GetMaxHealth]Entity.GetMaxHealth [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Set the health of the player with the index 1 to it's maximum (200). |
|---|---|
| Used on | |
| Code | local ply = player.GetByID( 1 ) ply:SetMaxHealth(200) ply:SetHealth( ply:GetMaxHealth( ) ) |
| Output | N/A |
Additional Notes
- This does not appear to do anything in Clientside scripts, returning 1.