
All checks were successful
Build / Build (push) Successful in 39s
This commit significantly enhances the `README.md` file, providing comprehensive documentation for the ArmaDragonflyClient. Key changes: * **Detailed Function Categories:** Categorized functions for better organization (Core, Basic Data Operations, Hash Operations, List Operations). * **Usage Examples:** Added clear and concise usage examples for basic operations, hash operations (context and ID-specific), and list operations. * **Function Documentation Structure:** Outlined the structure for individual function documentation. * **License Information:** Updated the license information.
2.9 KiB
2.9 KiB
title, icon, excerpt
title | icon | excerpt |
---|---|---|
ArmaDragonflyClient - Hash Set ID | mdi:file-text-outline | Set the specified field to the respective value in the hash stored at key from DragonflyClient. |
dragonfly_db_fnc_hashSetId
Description
Sets the value of a specified field in a specific hash table identified by its key. This function allows storing various data types (arrays, strings, numbers, or booleans) in a targeted hash table, making it ideal for player-specific or entity-specific data storage. It provides a way to organize related data under a common identifier.
Syntax
[_key, _keyField, _data] call dragonfly_db_fnc_hashSetId
Parameters
Parameter | Type | Description | Default |
---|---|---|---|
_key |
String | Identifier of the hash table | "" |
_keyField |
String | Name of the field in the hash to set | "" |
_data |
Array, String, Number, or Boolean | The value to store in the hash field | [] |
Return Value
None. The operation runs synchronously to store the data.
Examples
Store a player's loadout under their UID:
[getPlayerUID player, "loadout", [getUnitLoadout player]] call dragonfly_db_fnc_hashSetId;
Store vehicle data:
["vehicle_123", "status", [true, 100, 75, "active"]] call dragonfly_db_fnc_hashSetId;
Store player data from a client:
[getPlayerUID player, "stats", [rank player, score player, name player]] remoteExecCall ["dragonfly_db_fnc_hashSetId", 2, false];
Notes
- Stores a single field-value pair in a specific hash table identified by
_key
- All three parameters (key, keyField, and data) are required and validated
- If the hash table doesn't exist, it will be created automatically
- If the field already exists in the hash table, its value will be overwritten
- Supports various data types: arrays, strings, numbers, and booleans
- Player UIDs are commonly used as keys to store player-specific data
- Complex data structures should be serialized into arrays
- The operation is executed immediately and synchronously
- All operations are logged for debugging purposes
Related Functions
dragonfly_db_fnc_hashSet
: Sets a field value in the global hash tabledragonfly_db_fnc_hashGetId
: Retrieves a field value from a specific hash tabledragonfly_db_fnc_hashGetAllId
: Retrieves all fields from a specific hash tabledragonfly_db_fnc_hashSetIdBulk
: Sets multiple field-value pairs in multiple hash tables
Links
Hash Get | Hash Get All | Hash Get All ID | Hash Get ID | Hash Set | Hash Set Bulk | Hash Set ID | Hash Set ID Bulk