ArmaDragonflyClient - Hash Get ID

Hash Get ID

Description

Retrieves the value of a specific field from a hash table identified by its key. This function allows targeted access to individual fields within a specific hash table, making it ideal for accessing particular attributes of player or entity data. The retrieved data is returned through a callback function.

Syntax

[_key, _keyField, _function, _call, _netId] call dragonfly_db_fnc_hashGetId

Parameters

ParameterTypeDescriptionDefault
_keyStringIdentifier of the hash table""
_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 field:

[getPlayerUID player, "loadout", "dragonfly_db_fnc_test"] call dragonfly_db_fnc_hashGetId;

Retrieve a specific vehicle property with synchronous callback:

["vehicle_123", "fuel", "dragonfly_db_fnc_processFuelData", true] call dragonfly_db_fnc_hashGetId;

Retrieve data and send it to a specific client:

[getPlayerUID player, "stats", "dragonfly_db_fnc_test", false, netId player] remoteExecCall ["dragonfly_db_fnc_hashGetId", 2, false];

Notes

  • Retrieves a single field value from a specific hash table
  • All three primary parameters (_key, _keyField, and _function) are required and validated
  • The data is retrieved asynchronously through the extension's callback system
  • 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 targets both a specific hash table (_key) and a specific field (_keyField)
  • More efficient than retrieving all hash fields when only one is needed
  • Player UIDs are commonly used as keys to store player-specific data
  • 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