client/addons/admin/functions/fnc_adminRefresh.sqf
Jacob Schmidt d474b3676a
All checks were successful
Build / Build (push) Successful in 28s
Refactor: Standardize function descriptions and variable handling
This commit refactors several client-side functions to improve code consistency and readability.

- Standardizes function descriptions by removing redundant "Function: forge_client..." prefixes and "[Description]" sections, focusing on concise descriptions of the function's purpose.
- Updates variable handling in arsenal functions to use GVAR and EGVARS for default values, improving consistency and reducing code duplication.
- Removes the bank init function as it is no longer needed.
- Adds a done variable to the preinit file.
2025-05-25 11:30:26 -05:00

37 lines
827 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: IDSolutions
* Refreshes the admin interface
*
* Arguments:
* 0: Dummy <ANY> - Optional parameter, not used (for compatibility with event handlers)
*
* Return Value:
* None
*
* Examples:
* [] call forge_client_admin_fnc_adminRefresh;
* ["dummy"] call forge_client_admin_fnc_adminRefresh;
*
* Public: No
*/
private _dialog = findDisplay 202303;
private _list = _dialog displayCtrl 2023001;
lbClear _list;
{
if (str (side _x) == str (playerSide)) then {
private _name = name (_x);
private _paygrade = GETVAR(_x,FORGE_PayGrade,QUOTE(E1));
private _index = _list lbAdd format["%1 - %2", _name, _paygrade];
_list lbSetData [_index, getPlayerUID _x];
};
} forEach allPlayers;
lbSetCurSel [2023001, 0];
ctrlSetText [2023005, ""];
ctrlSetText [2023006, ""];