Squirrel/Client/Events/Player/onClientArmourChange

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|onClientArmourChange}} This is called when the clients Armour changes. == Syntax == <code lang="squirrel">function onClientArmourChange( int iOldArmour, int iN…')

Revision as of 20:55, 11 April 2011

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This is called when the clients Armour changes.

Syntax

  1. function onClientArmourChange( int iOldArmour, int iNewArmour )

Arguments

  • iOldArmour - The player's Old Armour Value
  • iNewArmour - The player's New Armour 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.

  1. pPlayer <- FindLocalPlayer();
  1.  
  2. function onClientArmourChange( iOldArmour, iNewArmour ) {
  3. MessagePlayer("You have: " + pPlayer.Armour + "Armour remaining", pPlayer );
  4. return 1;
  5. }
  6.  

Notes

The functions MessagePlayer and Player.Armour were used in this example. More info about them can be found in the corresponding pages.

Related Events

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox