Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- span class="re5"> findHouses = {
- private ["_buildings","_minPositions","_enterables","_alive"];
- _buildings = nearestObjects [_this select 0, ["House"], _this select 1];
- _minPositions = (_this select 2) - 1;
- _alive = _this select 3;
- _enterables = [];
- {
- if (
- format["%1", _x buildingPos _minPositions] != "[0,0,0]"
- && (alive _x)
- ) then {
- _enterables set [count _enterables, _x];
- };
- } forEach _buildings;
- _enterables
- };
- getGridPos = {
- private ["_pos","_x","_y"];
- _pos = getPosATL _this;
- _x = _pos select 0;
- _y = _pos select 1;
- _x = _x - (_x % 100);
- _y = _y - (_y % 100);
- [_x + 50, _y + 50, 0]
- };
- getCurGrid = {
- _gc = player call getGridPos;
- _ngx = _gc select 0;
- _ngy = _gc select 1;
- systemchat format ["%1 %2",_ngx,_ngy];
- };
- nearestPlayers = {
- private ["_result","_pos","_range","_type","_alive","_arr"];
- _pos = _this select 0;
- _range = _this select 1;
- _alive = _this select 2;
- _type = _this select 3;
- if (_type == "count") then { _result = 0; } else { _result = []; };
- {
- if (!isNil _x) then {
- _plr = call compile _x;
- if (!isNull _plr) then {
- if (_plr distance _pos <= _range && (alive _plr || !_alive)) then {
- if (_type == "count") then { _result = _result + 1; } else { _result = _result + [_plr]; };
- };
- };
- };
- } forEach AllPlayers;
- _result
- };
- #define nearestPlayers(W,X,Y,Z) ([W,X,Y,Z] call nearestPlayers)
- gridClear = {
- private ["_gMkr"];
- if (vehicle player != player) exitWith {};
- _gMkr = str(player call getGridPos);
- if isNil "_gMkr" exitWith {};
- if (markerColor _gMkr == "ColorBLUFOR") exitWith {};
- //WORK
- if ({side group _x == INDEPENDENT} count (allUnits inAreaArray _gMkr) > 0) exitWith {};
- _gMkr setMarkerColor "ColorBLUFOR";
- //_gMkr setMarkerTypeLocal "B_unknown";
- missionNamespace setVariable [format["%1cleared", _gMkr], true];
- publicVariable format["%1cleared", _gMkr];
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement