ArmaDragonflyClient - Hash Get

Hash Get

Description

Retrieves the value associated with a specific field in the hash table of the current client/player. This function automatically determines the appropriate hash ID based on the caller's identity, making it more convenient than hashGetId which requires manually specifying an ID. It accesses hash data asynchronously and returns the result through a callback function.

Syntax

[_keyField, _function, _call, _netId] call dragonfly_db_fnc_hashGet

Parameters

ParameterTypeDescriptionDefault
_keyFieldStringName of the field in the hash to retrieve""
_functionStringName of the function to receive the retrieved data""
_callBooleanWhether to call the function directly (true) or spawn (false)false
_netIdString(Optional) NetID of the player to receive the datanil

Return Value

None. The retrieved data is passed to the specified callback function asynchronously.

Examples

Retrieve a player's loadout:

["loadout", "dragonfly_db_fnc_test"] call dragonfly_db_fnc_hashGet;

Retrieve data with synchronous callback:

["playerScore", "dragonfly_db_fnc_processScore", true] call dragonfly_db_fnc_hashGet;

Retrieve data and send it to a specific client:

["loadout", "dragonfly_db_fnc_test", false, netId player] remoteExecCall ["dragonfly_db_fnc_hashGet", 2, false];

Notes

  • Retrieves a value from the current client's hash table
  • The data is retrieved asynchronously through the extension's callback system
  • Both the _keyField and _function parameters must be provided
  • Input validation ensures both required parameters are non-empty
  • When a netId is provided, the data is sent to that specific client
  • The _call parameter determines whether the function is called directly (synchronous) or spawned (asynchronous)
  • This function automatically determines which hash table to use based on the caller's identity
  • Use hashGetId when you need to specify a particular hash table by ID
  • For large data that exceeds buffer limits, it will be automatically chunked and reassembled
  • All operations are logged for debugging purposes

Hash Get | Hash Get ID | Hash Get All | Hash Get All ID | Hash Set | Hash Set ID | Hash Set Bulk | Hash Set Bulk ID