Files
DayZ-Epoch/SQF/dayz_code/compile/fn_find_plots.sqf
ebaydayz 01d8197d12 Remove redundant function fn_check_owner_friends
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.
2016-06-15 20:09:04 -04:00

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