server/addons/admin/functions/fnc_initAdmin.sqf
Jacob Schmidt 991ee5019a feat: Enhance admin and bank event handling with improved logging
This commit refines the event handling for both admin and bank functionalities, ensuring better clarity and consistency in logging.

Key changes include:

- Updated event names in admin handling to follow a consistent naming convention.
- Improved parameter handling in admin event functions, ensuring validation checks are in place.
- Enhanced logging messages to provide clearer context regarding the source of events and actions taken.
- Introduced bank event handling for deposit, transfer, withdrawal, and balance inquiries, with appropriate validation and logging.

These changes aim to improve the maintainability and readability of the codebase while ensuring robust event management.
2025-05-10 17:50:21 -05:00

18 lines
792 B
Plaintext

#include "..\script_component.hpp"
{
private _configName = configName(_x);
private _className = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "className") call BFUNC(getCfgData);
private _pos = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "pos") call BFUNC(getCfgData);
private _dir = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "dir") call BFUNC(getCfgData);
private _cpof = createSimpleObject [_className, [0, 0, 0]];
_cpof setPosATL _pos;
_cpof setDir _dir;
_cpof allowDamage false;
_cpof setVariable ["isCPOF", true, true];
diag_log text format ["[FORGE::Server::Admin::initAdmin] ClassName: '%1' Pos: '%2' Dir: '%3'", _className, _pos, _dir];
} forEach ("true" configClasses (missionConfigFile >> "CfgCpofs" >> "cpofs"));