Prevent Zed + loot spawn in safezones

thanks BaroN for the idea
This commit is contained in:
icomrade
2017-09-13 12:45:00 -04:00
parent 404210ac04
commit d750f576ed
10 changed files with 61 additions and 56 deletions

View File

@@ -1,4 +1,4 @@
private ["_array","_vehicle","_part","_hitpoint","_type","_isOK","_brokenPart","_cancel","_finished","_hasToolbox","_nameType","_namePart","_damage","_BreakableParts","_selection","_wpn","_classname","_ismelee"];
private ["_array","_vehicle","_part","_hitpoint","_type","_isOK","_brokenPart","_finished","_hasToolbox","_nameType","_namePart","_damage","_BreakableParts","_selection","_wpn","_classname","_ismelee"];
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
dayz_actionInProgress = true;
@@ -11,7 +11,6 @@ _type = typeOf _vehicle;
_isOK = false;
_brokenPart = false;
_hasToolbox = "ItemToolbox" in items player;
_cancel = false;
_nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
@@ -21,10 +20,7 @@ s_player_repairActions = [];
s_player_repair_crtl = 1;
if (_hasToolbox) then {
{
if ((_vehicle distance (_x select 0)) < (_x select 1)) exitWith {_cancel = true;};
} count DZE_SafeZonePosArray;
if (_cancel) exitWith { (localize "str_salvage_safezone") call dayz_rollingMessages;};
if (_vehicle call DZE_SafeZonePosCheck) exitWith {(localize "str_salvage_safezone") call dayz_rollingMessages;};
[player,"repair",0,false] call dayz_zombieSpeak;
[player,50,true,(getPosATL player)] call player_alertZombies;