Fix clothes change exit on gear count fail

This commit is contained in:
icomrade
2016-10-13 11:42:01 -04:00
parent aac372d320
commit c89031e089

View File

@@ -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;