This commit is contained in:
[VB]AWOL
2013-11-24 03:35:13 -06:00
parent d55abe389a
commit f4909fd676
6 changed files with 71 additions and 41 deletions

View File

@@ -417,6 +417,25 @@ if (!isDedicated) then {
_objName = toLower(toString(_objName));
_objName
};
dze_isnearest_player = {
private ["_notClosest","_playerDistance","_nearPlayers","_obj","_playerNear"];
if(!isNull _this) then {
_nearPlayers = _this nearEntities ["CAManBase", 12];
_playerNear = ({isPlayer _x} count _nearPlayers) > 1;
_notClosest = false;
if (_playerNear) then {
// check if another player is closer
_playerDistance = player distance _this;
{
if (_playerDistance > (_x distance _this)) exitWith { _notClosest = true; };
} forEach _nearPlayers;
};
} else {
_notClosest = false;
};
_notClosest
};
dayz_originalPlayer = player;