mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Fn_check_access provides the same functionality and more. Removed folders that only contained a single file to clean things up. Also added epoch tag friendly code to vanilla player_updateGui for now.
27 lines
780 B
Plaintext
27 lines
780 B
Plaintext
// Find Plots by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/)
|
|
|
|
private ["_player","_isPole","_IsNearPlot","_nearestPole","_distance","_findNearestPoles","_findNearestPole","_friendly","_return","_pos"];
|
|
|
|
_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;
|
|
};
|
|
|
|
_pos = [vehicle _player] call FNC_getPos;
|
|
|
|
// check for near plot
|
|
_findNearestPole = _pos 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
|