Squirrel/Client/Events/Player/onClientArmourChange

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Fixed example)
m (cash->armour)
Line 17: Line 17:
 
== Example ==
 
== Example ==
  
This example will Message the player when their cash changes
+
This example will Message the player when their armour changes
  
 
<code lang="squirrel">
 
<code lang="squirrel">

Revision as of 18:56, 14 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

This event does not handle return values.

Example

This example will Message the player when their armour changes

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

Notes

The functions Message 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