Add a few missing playerIsNear checks

Blocks duping method reported by Sercan and confirmed with @oiad .
Thanks
This commit is contained in:
ebayShopper
2017-02-25 17:29:27 -05:00
parent a3f2b8db57
commit d12fda5e21
5 changed files with 30 additions and 7 deletions

View File

@@ -14,9 +14,14 @@ if (DZE_permanentPlot) then {
_ownerID = _obj getVariable["ownerPUID","0"];
};
// Make sure you are the closest player to the tent
_playerNear = _obj call dze_isnearest_player;
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_16" call dayz_rollingMessages;};
// Make sure no other players are nearby
_playerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase",10]) > 1;
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_pickup_limit_5" call dayz_rollingMessages;};
_packobj = getText (configFile >> "CfgVehicles" >> typeOf _obj >> "pack");
player removeAction s_player_packtent;