Jacob Schmidt c8d81ba3bb
All checks were successful
Build / Build (push) Successful in 39s
docs: Update README.md with detailed documentation
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.
2025-03-30 17:15:35 -05:00

2.1 KiB

title, icon, excerpt
title icon excerpt
ArmaDragonflyClient - Get Key mdi:file-text-outline Get the value of stored key from DragonflyClient.

dragonfly_db_fnc_get

Description

Retrieves the value of a stored key from the database. This function performs an asynchronous request to the database and passes the retrieved data to the specified callback function.

Syntax

[_key, _function, _call, _netId] call dragonfly_db_fnc_get

Parameters

Parameter Type Description
_key String Name of the stored key to retrieve from the database
_function String Name of the function to call when data is retrieved
_call Boolean Whether to call the function directly (true) or spawn (false)
_netId String (Optional) NetID of the player to whom the data should be returned

Return Value

None. When data is retrieved, it will be passed to the specified function. The operation runs asynchronously.

Examples

Retrieve data in singleplayer or on the server:

[getPlayerUID player, "dragonfly_db_fnc_test"] call dragonfly_db_fnc_get;

Retrieve data on the server and send to a specific client:

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

Notes

  • The function exit with an error if the key or function parameters are empty
  • Data is processed through the scheduler system, which manages callback responses
  • For large data that exceeds buffer limits, it will be automatically chunked and reassembled
  • The callback function must be defined to accept the retrieved data
  • The _call parameter determines whether the callback is executed directly or spawned in a separate thread
  • dragonfly_db_fnc_set: Stores a value by key
  • dragonfly_db_fnc_delete: Removes a value by key
  • dragonfly_db_fnc_scheduler: Processes the callback response

Delete Key | Get Key | Set Key