Squirrel/Server/Functions/HashTables/Get
From Liberty Unleashed Wiki
(Difference between revisions)
(New page: __NOTOC__ == Syntax == <code>HashTable.Get( data )</code> == Arguments == * ''' data ''' - The info that you wish to remove from the hash table. == Example == <code lang="squirrel"> ...) |
|||
Line 1: | Line 1: | ||
− | + | {{Squirrel/Title|HashTable.Get}} | |
== Syntax == | == Syntax == |
Revision as of 10:23, 11 October 2010
Syntax
HashTable.Get( data )
Arguments
- data - The info that you wish to remove from the hash table.
Example
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "cash" ) Message( pPlayer.Name + " is currently holding $" + pDataHash.Get( pPlayer.Name + "Money" ); }
This example will fetch the reference (playnameMoney) to the players money value when they use /cash.
Notes
The function onPlayerCommand and Player.Name were used in this example, more info about them in the corresponding page.