Squirrel/Server/Functions/HashTables/Get
From Liberty Unleashed Wiki
(Difference between revisions)
(→Arguments) |
|||
Line 7: | Line 7: | ||
== Arguments == | == Arguments == | ||
− | * ''' data ''' - The info that you wish to | + | * ''' data ''' - The info that you wish to get from the hash table. |
== Example == | == Example == |
Latest revision as of 19:42, 4 July 2015
[edit] Syntax
HashTable.Get( data )
[edit] Arguments
- data - The info that you wish to get from the hash table.
[edit] 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.
[edit] Notes
The function onPlayerCommand and Player.Name were used in this example, more info about them in the corresponding page.