Squirrel/Client/Functions/Players/Health
From Liberty Unleashed Wiki
Contents |
Syntax
float player.Health
player.Health = float value
Arguments
- value - What you can set the health value to.
Example
pPlayer <- FindLocalPlayer(); function onClientCommand( cmd, text ) { if ( cmd == "health" ) { pPlayer.Health = 100; Message( "[#00ff00]*System* [#ff0000]Your health is " + pPlayer.Health + "."); } }
This will heal the player when He use /health.
Notes
The call onClientCommand and Message were used in in this example. More info about them in the corresponding page.