From 590e748460fbdb0c0a06d3917d26bae81f2c517c Mon Sep 17 00:00:00 2001 From: Cyruz143 Date: Fri, 28 Oct 2022 12:35:29 +0100 Subject: [PATCH 1/2] Add fnc to hide UI --- addons/ark_admin_tools/functions/fnc_showUI.sqf | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 addons/ark_admin_tools/functions/fnc_showUI.sqf diff --git a/addons/ark_admin_tools/functions/fnc_showUI.sqf b/addons/ark_admin_tools/functions/fnc_showUI.sqf new file mode 100644 index 0000000..0d101b3 --- /dev/null +++ b/addons/ark_admin_tools/functions/fnc_showUI.sqf @@ -0,0 +1,8 @@ +ark_admin_tools_fnc_showUI = { + params ["_shown"]; + + showChat _shown; + showHUD _shown; + missionNamespace setVariable ["diwako_dui_main_toggled_off", !_shown]; + player setVariable ["acre_sys_core_isDisabled", !_shown, true]; +}; \ No newline at end of file From 2b120139ae46976684037fdb4561840459a585d6 Mon Sep 17 00:00:00 2001 From: Cyruz143 Date: Fri, 28 Oct 2022 12:37:43 +0100 Subject: [PATCH 2/2] Add mute flag --- addons/ark_admin_tools/functions/fnc_showUI.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/ark_admin_tools/functions/fnc_showUI.sqf b/addons/ark_admin_tools/functions/fnc_showUI.sqf index 0d101b3..e8b87f3 100644 --- a/addons/ark_admin_tools/functions/fnc_showUI.sqf +++ b/addons/ark_admin_tools/functions/fnc_showUI.sqf @@ -1,8 +1,8 @@ ark_admin_tools_fnc_showUI = { - params ["_shown"]; + params ["_shown", "_mute"]; showChat _shown; showHUD _shown; missionNamespace setVariable ["diwako_dui_main_toggled_off", !_shown]; - player setVariable ["acre_sys_core_isDisabled", !_shown, true]; + player setVariable ["acre_sys_core_isDisabled", _mute, true]; }; \ No newline at end of file