onClientHealthChange

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This is called when the clients health changes.

Syntax

  1. function onClientHealthChange( int oldhp, int newhp )

Arguments

  • oldhp - The player's old health
  • newhp - The player's new health

Returns

This event does not handle return values.

Example

This example will message the player when their health changes

  1.  
  2. function onClientHealthChange( oldhp, newhp )
  3. {
  4. Message( "You have: " + newhp + " health remaining" );
  5. return 1;
  6. }
  7.  

Notes

The function Message was used in this example. More info about it can be found in the corresponding page.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox