Files
DayZ-Epoch/SQF/dayz_code/actions/player_build_countNearby.sqf
2016-02-18 00:24:50 -05:00

11 lines
457 B
Plaintext

// disallow building if too many objects are found within 30m (by default)
private ["_cnt","_pos"];
_pos = [player] call FNC_GetPos;
_cnt = count (_pos nearObjects ["All",DZE_checkNearbyRadius]);
if (_cnt >= DZE_BuildingLimit) exitWith { //end script if too many objects nearby
DZE_ActionInProgress = false;
cutText [(format [localize "str_epoch_player_41", DZE_PlotPole select 0]), "PLAIN DOWN"];
};
_cnt //returns amount of total objects found nearby