HashTable.Inc

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


Syntax

  1. HashTable.Inc( data )
  1. HashTable.Inc( data, int Amount )

Arguments

  • data - The value that you wish to decrease.
  • Amount - How much you wish to increase the amount by (optional - default is 1)

Example

  1.  
  2. function onPlayerKill( pPlayer, pKilled, iWeaponID, iBodyPart )
  3. {
  4. pDataHash.Inc( pPlayer.Name + ".Cash", 500 );
  5. }
  6.  

This example will increase the value of the stored cash amount by 500.

Notes

The function onPlayerKill and Player.Name were used in this example, more info about them in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox