Use nearEntities for plot pole searches

Also made 73899d5 compatible with DZE_permanentPlot = false; at the
request of @oiad
This commit is contained in:
ebayShopper
2017-03-29 16:04:48 -04:00
parent 30d961931f
commit 746b921321
9 changed files with 14 additions and 21 deletions

View File

@@ -24,7 +24,13 @@ _friendlies = [];
if (_isPole) then {
_plotcheck = [player, true] call FNC_find_plots;
_distance = DZE_PlotPole select 1;
if (DZE_limitPlots && {!((getPlayerUID player) in DZE_PlotManagementAdmins)}) then {_hasPole = call FNC_plotCheck;};
if (DZE_limitPlots && {!(dayz_playerUID in DZE_PlotManagementAdmins)}) then {
{
if (_x getVariable["ownerPUID","0"] == dayz_playerUID or (_x getVariable["CharacterID","0"] == dayz_characterID)) exitWith {
_hasPole = true;
};
} count (entities "Plastic_Pole_EP1_DZ");
};
} else {
_plotcheck = [player, false] call FNC_find_plots;
_distance = DZE_PlotPole select 0;

View File

@@ -613,7 +613,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
player removeAction s_player_breakinhouse;
s_player_breakinhouse = -1;
};*/
if ((_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") && {speed player <= 1}) then {
if (_typeOfCursorTarget == "Plastic_Pole_EP1_DZ" && {speed player <= 1}) then {
_hasAccess = [player, _cursorTarget] call FNC_check_access;
_allowed = ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3) or (_hasAccess select 4));
if (DZE_permanentPlot) then {