From c89031e0890708e458c48ae19150f26cd92010ce Mon Sep 17 00:00:00 2001 From: icomrade Date: Thu, 13 Oct 2016 11:42:01 -0400 Subject: [PATCH] Fix clothes change exit on gear count fail --- SQF/dayz_code/compile/player_switchModel.sqf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/compile/player_switchModel.sqf b/SQF/dayz_code/compile/player_switchModel.sqf index dae802e07..322c023ce 100644 --- a/SQF/dayz_code/compile/player_switchModel.sqf +++ b/SQF/dayz_code/compile/player_switchModel.sqf @@ -17,7 +17,13 @@ _weapons = weapons player; _countMags = call player_countMagazinesWBackpack; //magazines player; if (typeName _countMags != "ARRAY") exitWith {localize "str_actions_switchmodel_fail" call dayz_rollingMessages;}; _magazines = _countMags select 0; -if ((_playerUID == dayz_playerUID) && (count _magazines == 0) && (count (magazines player) > 0)) exitWith {localize "str_actions_switchmodel_fail" call dayz_rollingMessages;}; +if ((_playerUID == dayz_playerUID) && (count _magazines == 0) && (count (magazines player) > 0)) exitWith { + localize "str_actions_switchmodel_fail" call dayz_rollingMessages; + if (gear_done) then { + (findDisplay 106) closeDisplay 0; closeDialog 0; + disableUserInput false;disableUserInput false;disableUserInput false;disableUserInput false; + }; +}; _primweapon = primaryWeapon player; _secweapon = secondaryWeapon player;