Files
DayZ-Epoch/SQF/dayz_code/system/building_monitor.sqf
icomrade c3ed4e49e1 Replace sleep with uiSleep
see the below links for more info. uiSleep is based off of a more
accurate method of tracking time, whereas sleep can fluctuate depending
on application performance since it is based on framerate.
https://community.bistudio.com/wiki/uiSleep
https://community.bistudio.com/wiki/sleep_vs_uiSleep
https://community.bistudio.com/wiki/sleep
2016-02-17 13:03:17 -05:00

18 lines
507 B
Plaintext

private ["_building","_GroupMarker","_nearby","_run","_items"];
_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};
} count (call BIS_fnc_listPlayers);
if (!_nearby) then {_run = false};
uiSleep 5;
};
{deleteVehicle _x;} count _items;
_building setVariable ["looted",(DateToNumber date),true];