Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isServer) then {
- sleep 10;
- _vehicle = _this select 0;
- _units = _this select 1;
- _startPos = getPos _vehicle;
- countUnits = {
- _units = _this select 0;
- _i = 0;
- {
- if (!isNil _x) then {
- _i = _i +1;
- };
- } foreach _units;
- _i
- };
- if (typeName _units == typeName []) then { // list of units
- if (([_units] call countUnits) <= 0) then { // despawn
- _vehicle setPos (getPos vehiclePen);
- waitUntil {sleep 5; ([_units] call countUnits) > 0};
- _vehicle setPos _startPos;
- };
- } else { if (typeName _units == typeName "") then { // group var name
- if (isNil _units) then { // despawn
- _vehicle setPos (getPos vehiclePen);
- waitUntil {sleep 5; (!isNil _units)};
- _vehicle setPos _startPos;
- };
- } };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement