Add A Plot For Life modification by RimBlock

A Plot For Life also includes Precise Base Building by Mikeeeyy. Precise
base building has no variable to switch it on or off, I don't think it
should.

Seems to work well enough, this may conflict with the duplicate object
uid fix, it appears to spam my server rpt.
This commit is contained in:
icomrade
2016-05-02 20:42:37 -04:00
parent 16fe17645f
commit 575682b7c8
31 changed files with 591 additions and 171 deletions

View File

@@ -0,0 +1,33 @@
// Check Ownership by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/)
private ["_player","_object","_playerUID","_ObjectOwner","_owner","_friendlies","_friendly"];
_player = _this select 0;
_Object = _this select 1;
_PlotManagement = _this select 2;
_Owner = false;
_friendly = false;
_friendlies = [];
_ObjectOwner = "0";
if (_PlotManagement) then {
_friendlies = [_Object, true, false] call dze_getPlotFriends;
} else {
_friendlies = _player getVariable ["friendlyTo",[]];
};
if (DZE_plotforLife) then {
_playerUID = [_player] call FNC_GetPlayerUID;
_ObjectOwner = _object getVariable ["ownerPUID","0"];
_owner = (_playerUID == _ObjectOwner);
} else {
_ObjectOwner = _object getVariable["CharacterID","0"];
_owner = (_ObjectOwner == dayz_characterID);
};
if (_ObjectOwner in _friendlies) then {
_friendly = true;
};
[_owner, _friendly];

View File

@@ -0,0 +1,24 @@
// Find Plots by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/)
private ["_player","_ispole","_IsNearPlot","_nearestPole","_distance","_findNearestPoles","_findNearestPole","_friendly","_return"];
_player = _this select 0;
_ispole = _this select 1;
_IsNearPlot = 0;
_nearestPole = "";
_findNearestPole = [];
if(_isPole) then {
_distance = DZE_PlotPole select 1;
}else{
_distance = DZE_PlotPole select 0;
};
// check for near plot
_findNearestPole = (position (vehicle _player)) nearEntities ["Plastic_Pole_EP1_DZ", _distance];
_IsNearPlot = count (_findNearestPole);
if (_IsNearPlot > 0) then{_nearestPole = _findNearestPole select 0;}else{_nearestPole = objNull;};
_return = [_distance, _IsNearPlot, _nearestPole];
_return