HashTable.Add

From Liberty Unleashed Wiki
Revision as of 10:24, 11 October 2010 by VRocker (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events


Syntax

  1. HashTable.Add( key, value )

Arguments

  • key - How you will retrieve this information.
  • value - The info that you wish to add to the hash table, integer/float/string.

Example

  1.  
  2. function onPlayerJoin( pPlayer )
  3. {
  4. pDataHash.Add( pPlayer.Name + "IP", pPlayer.IP );
  5. }
  6.  

This example will add the player's ip to the database that just joined the server. It can be retrieved via playernameIP.

Notes

The function onPlayerJoin and Player.IP 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