onPlayerArmourChange

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

This is called when a player's armour amount changes, for any reason.

Syntax

  1. function onPlayerArmourChange( Player player, int oldArmour, int newArmour )

Arguments

  • player - The player pointer
  • oldArmour - Armour amount prior to the detected change
  • newArmour - Armour amount after the detected change

Returns

This event does not handle return values.

Example

This will detect any armour on a player in a server that does not have armour pickups/commands.

  1.  
  2. function onPlayerArmourChange( player, oldarm, newarm )
  3. {
  4. if ( newarm > oldarm ) Message( "Armour Cheats Detected on: " + player.Name );
  5. return 1;
  6. }
  7.  

Notes

The functions Message and Player.Name 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