ACE3/addons/ai/initSettings.sqf
jonpas 938f421ac3
AI - Add automatic NVG equip/unequip (#9313)
Co-authored-by: Dystopian <sddex@ya.ru>
Co-authored-by: Mike-MF <TyroneMF@hotmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-09-05 16:20:06 +02:00

20 lines
554 B
Plaintext

private _category = format ["ACE %1", LLSTRING(DisplayName)];
[
QGVAR(assignNVG), "CHECKBOX",
[LSTRING(AssignNVG_DisplayName), LSTRING(AssignNVG_Description)],
_category,
false,
1,
{
if (isServer) then {
params ["_enabled"];
if (_enabled && {!GVAR(assignNVGthread)}) then {
TRACE_1("start loop",_this);
GVAR(assignNVGthread) = true;
[FUNC(assignNVGpfh), [], 1] call CBA_fnc_waitAndExecute;
};
};
}
] call CBA_fnc_addSetting;