Files
DayZ-Epoch/SQF/dayz_code/system/building_monitor.sqf
2016-03-31 11:35:33 -04:00

19 lines
471 B
Plaintext

private ["_nearby","_run"];
_building = _this select 0;
//_GroupMarker = _this select 1;
_items = _this select 2;
_run = true;
_nearby = false;
while {_run} do {
if (isNull _building) then {_run = false};
_nearby = false;
{
if (_x distance _building < 500) then {_nearby = true};
} forEach (call BIS_fnc_listPlayers);
if (!_nearby) then {_run = false};
uiSleep 5;
};
{deleteVehicle _x;} forEach _items;
_building setVariable ["looted",(DateToNumber date),true];