Files
DayZ-Epoch/SQF/dayz_code/actions/plotManagement/plotRemoveFriend.sqf
ebayShopper 746b921321 Use nearEntities for plot pole searches
Also made 73899d5 compatible with DZE_permanentPlot = false; at the
request of @oiad
2017-03-29 16:04:48 -04:00

22 lines
615 B
Plaintext

private ["_pos","_plots","_thePlot","_friends","_toRemove","_newList"];
_pos = _this select 0;
if (_pos < 0) exitWith {};
_plots = ([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15];
_thePlot = _plots select 0;
_friends = _thePlot getVariable ["plotfriends", []];
_toRemove = (_friends select _pos);
_newList = [];
{
if (_x select 0 != _toRemove select 0) then {
_newList set [(count _newList), _x];
};
} count _friends;
_thePlot setVariable ["plotfriends", _newList, true];
PVDZ_veh_Save = [_thePlot,"gear"];
publicVariableServer "PVDZ_veh_Save";
call PlotGetFriends;
call PlotNearbyHumans;