mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
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
18 lines
507 B
Plaintext
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]; |