mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user