From 8ab9c2252a74f14c1a33b7a703f062d5d6e60a12 Mon Sep 17 00:00:00 2001 From: worldwidesorrow Date: Tue, 21 Apr 2020 14:35:07 -0500 Subject: [PATCH] Update keyboard.sqf Pressing the F3 increases variable DZE_UI by one each time. The variable gets reset to zero when it reaches 6. --- SQF/dayz_code/compile/keyboard.sqf | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/SQF/dayz_code/compile/keyboard.sqf b/SQF/dayz_code/compile/keyboard.sqf index 2a770d2e2..b098af20f 100644 --- a/SQF/dayz_code/compile/keyboard.sqf +++ b/SQF/dayz_code/compile/keyboard.sqf @@ -69,13 +69,10 @@ if (isNil "keyboard_keys") then { _handled = true; }; _statusUI = { - if (profileNamespace getVariable ["statusUI",1] == 1) then { - profileNamespace setVariable ["statusUI",0]; - [format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_DISABLED"],1] call dayz_rollingMessages; - } else { - profileNamespace setVariable ["statusUI",1]; - [format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_ENABLED"],1] call dayz_rollingMessages; - }; + DZE_UI = DZE_UI + 1; + if (DZE_UI == 6) then {DZE_UI = 0; [format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_DISABLED"],1] call dayz_rollingMessages;}; + if (DZE_UI == 1) then {[format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_ENABLED"],1] call dayz_rollingMessages;}; + profileNamespace setVariable ["statusUI",DZE_UI]; saveProfileNamespace; call ui_changeDisplay; _handled = true; @@ -344,4 +341,4 @@ if (!isNil "_code") then { call _code; }; -_handled \ No newline at end of file +_handled