Skip to content

Commit

Permalink
Add more checking for vg_removeKey
Browse files Browse the repository at this point in the history
  • Loading branch information
oiad committed Jul 19, 2017
1 parent 27a6431 commit e2f0602
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions scripts/virtualGarage/player_getVehicle.sqf
Expand Up @@ -8,15 +8,17 @@ _vehicle = lbData[2802,(lbCurSel 2802)];
_vehicle = (call compile format["%1",_vehicle]);
_isOK = true;

if (_vehicle select 3 != 0) then {
_totalTools = 0;
{
if (getNumber (configFile >> "CfgWeapons" >> _x >> "type") == 131072) then {_totalTools = _totalTools + 1;};
} count (weapons player);
if (_totalTools == 12) then {_isOK = false};
};
if (vg_removeKey) then {
if (_vehicle select 3 != 0) then {
_totalTools = 0;
{
if (getNumber (configFile >> "CfgWeapons" >> _x >> "type") == 131072) then {_totalTools = _totalTools + 1;};
} count (weapons player);
if (_totalTools == 12) then {_isOK = false};
};

if (!_isOK) exitWith {localize "str_epoch_player_107" call dayz_rollingMessages;};
if (!_isOK) exitWith {localize "str_epoch_player_107" call dayz_rollingMessages;};
};

_dir = round(random 360);
_backPack = [];
Expand Down

0 comments on commit e2f0602

Please sign in to comment.