Forbid removing the plot/door owner from objects (#1948)

This makes it so only the door or plot owner can remove them selves from
doors/plots or the UIDS in
DZE_PlotManagementAdmins/DZE_DoorManagementAdmins.
This commit is contained in:
oiad
2017-04-18 05:52:36 +12:00
committed by ebayShopper
parent 740e171d86
commit 2f0774d531
3 changed files with 13 additions and 1 deletions

View File

@@ -6,6 +6,9 @@ _plots = ([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15];
_thePlot = _plots select 0;
_friends = _thePlot getVariable ["plotfriends", []];
_toRemove = (_friends select _pos);
if ((_toRemove select 0) == ((_friends select 0) select 0) && (!(dayz_playerUID in DZE_PlotManagementAdmins) && !(dayz_playerUID == ((_friends select 0) select 0)))) exitWith {systemChat localize "STR_EPOCH_PLOTMANAGEMENT_CANT_REMOVE";};
_newList = [];
{
if (_x select 0 != _toRemove select 0) then {