mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-07 00:32:55 +03:00
Plot Management cleanup + improvement
New compile DZE_GetPlotFriends DZE_PlotManagementAdmins allows admin management of plot poles and buildables near poles DZE_MaxPlotFriends allows servers to allow more than 6 friends on a pole at once
This commit is contained in:
@@ -2,16 +2,16 @@ private ["_list","_plots","_thePlot","_friends"];
|
||||
|
||||
_pos = _this select 0;
|
||||
if (_pos < 0) exitWith {};
|
||||
_plots = nearestObjects [player, ["Plastic_Pole_EP1_DZ"],15];
|
||||
_plots = nearestObjects [[player] call FNC_getPos, ["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 = _newList + [_x];
|
||||
_newList set [(count _newList), [_x]];
|
||||
};
|
||||
} forEach _friends;
|
||||
} count _friends;
|
||||
_thePlot setVariable ["plotfriends", _newList, true];
|
||||
|
||||
if (isServer) then {
|
||||
|
||||
Reference in New Issue
Block a user