
All checks were successful
Build / Build (push) Successful in 25s
This commit introduces admin event handling to manage various administrative actions and enhances the player data saving process. The following changes were made: - Implemented event handling for admin actions such as advancing funds, handling paydays, transferring funds, sending messages, and updating paygrades. These events are triggered via the `QGVAR(handleEvents)` event handler. - Added `initAdminStore` and `verifyAdminStore` functions to manage the admin store. - Refactored the `fnc_handleDisconnect.sqf` script to use the `GETVAR` macro for retrieving player data, ensuring consistency and readability. - Replaced hardcoded default values with `QUOTE()` wrapped values in `fnc_handleDisconnect.sqf` for better maintainability and configuration.
32 lines
732 B
Plaintext
32 lines
732 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Function: forge_server_admin_fnc_verifyAdminStore
|
|
* Author: IDSolutions
|
|
*
|
|
* [Description]
|
|
* Ensures the admin store is initialized and returns the store object.
|
|
* Acts as a singleton accessor for the admin store interface.
|
|
* If the store doesn't exist yet, it initializes it first.
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* Admin Store <OBJECT> - The admin store interface object
|
|
*
|
|
* Example:
|
|
* private _adminStore = call forge_server_admin_fnc_verifyAdminStore
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
private _store = GETMVAR(FORGE_ADMIN_STORE_REG,nil);
|
|
|
|
if (isNil "_store") then {
|
|
_store = call FUNC(initAdminStore);
|
|
|
|
diag_log text "[FORGE Admin] Admin store initialized";
|
|
};
|
|
|
|
_store |