onClientHealthChange
From Liberty Unleashed Wiki
This is called when the clients Health changes.
Syntax
function onClientHealthChange( int iOldHealth, int iNewHealth )
Arguments
- iOldHealth - The player's Old Health Value
- iNewHealth - The player's New Health Value
Returns
- 1 - No Effect
- 0 - No Effect
Example
This example will Message the player when their cash changes
Create a Global for a player pointer.
pPlayer <- FindLocalPlayer();
function onClientHealthChange( iOldHealth, iNewHealth ) { MessagePlayer("You have: " + pPlayer.Health + "Health remaining", pPlayer ); return 1; }
Notes
The functions MessagePlayer and Player.Health were used in this example. More info about them can be found in the corresponding pages.
Related Events
- onClientArmourChange
- onClientCashChange
- onClientCollideWithPlayer
- onClientCommand
- onClientDeath
- onClientFall
- onClientHealthChange
- onClientHurt
- onClientKill
- onClientKeyStateChange
- onClientRequestClass
- onClientRequestSpawn
- onClientShot
- onClientSpawn
- onClientUseDetonator
- onClientWeaponChange
- onPlayerDeath
- onPlayerJoin
- onPlayerKill
- onPlayerPart
- onPlayerSpawn