Code:
TitleText [format["Heli Bus Bitch"], "PLAIN DOWN"];
_veh = "UH1H_DZ";
_veh_type=_veh;
_dir = getdir vehicle player;
_pos = getPos vehicle player;
_pos = [(_pos select 0)-5*sin(_dir),(_pos select 1)-5*cos(_dir),0]; // 50 meters behind
_xos = _pos select 0;
_yos = _pos select 1;
_zos = _pos select 2;
_rid = 999+random(9999);
_nyan = format["
if (isServer) then {
call compile (""heli = create"" + ""Vehicle ['%1', [%2, %3, %4], [], 0, 'CAN_COLLIDE']; heli setVariable ['OwnerID', 0, true];
_uid = heli call dayz_objectUID;
heli setVariable ['ObjectUID', _uid, true];
heli setVariable ['ObjectID', _uid, true];
dayz_serverObjectMonitor se"" + ""t [count dayz_serverObjectMonitor, heli];"");
call compile (""bus1 = create"" + ""Vehicle ['Ikarus', [%2, %3, %4], [], 0, 'CAN_COLLIDE']; bus1 setVariable ['OwnerID', 0, true];
_uid = bus1 call dayz_objectUID;
bus1 setVariable ['ObjectUID', _uid, true];
bus1 setVariable ['ObjectID', _uid, true];
dayz_serverObjectMonitor se"" + ""t [count dayz_serverObjectMonitor, bus1];"");
call compile (""bus2 = create"" + ""Vehicle ['Ikarus', [%2, %3, %4], [], 0, 'CAN_COLLIDE']; bus2 setVariable ['OwnerID', 0, true];
_uid = bus2 call dayz_objectUID;
bus2 setVariable ['ObjectUID', _uid, true];
bus2 setVariable ['ObjectID', _uid, true];
dayz_serverObjectMonitor se"" + ""t [count dayz_serverObjectMonitor, bus2];"");
call compile (""bus3 = create"" + ""Vehicle ['Ikarus', [%2, %3, %4], [], 0, 'CAN_COLLIDE']; bus3 setVariable ['OwnerID', 0, true];
_uid = bus3 call dayz_objectUID;
bus3 setVariable ['ObjectUID', _uid, true];
bus3 setVariable ['ObjectID', _uid, true];
dayz_serverObjectMonitor se"" + ""t [count dayz_serverObjectMonitor, bus3];"");
call compile (""bus4 = create"" + ""Vehicle ['Ikarus', [%2, %3, %4], [], 0, 'CAN_COLLIDE']; bus4 setVariable ['OwnerID', 0, true];
_uid = bus4 call dayz_objectUID;
bus4 setVariable ['ObjectUID', _uid, true];
bus4 setVariable ['ObjectID', _uid, true];
dayz_serverObjectMonitor se"" + ""t [count dayz_serverObjectMonitor, bus4];"");
bus1 attachTo [heli,[2,0,2]];
bus2 attachTo [heli,[-2,0,2]];
bus3 attachTo [heli,[2,0,-2]];
bus4 attachTo [heli,[-2,0,-2]];
publicVariable ""heli"";
}
", _veh_type, _xos, _yos, _zos, _rid];
nilx2 = [_nyan] execVM "scr\exec.sqf";
_nyan = format["
[] spawn {
waituntil { !isnil(""heli"") };
_soundSource = createSoundSource [""Sound_Alarm2"", position heli, [], 0];
_soundSource attachto [heli];
_soundSource = createSoundSource [""Sound_Alarm"", position heli, [], 0];
_soundSource attachto [heli];
};
_soundSource = createSoundSource [""Sound_Alarm2"", position player, [], 0];
_soundSource attachto [player];
_soundSource = createSoundSource [""Sound_Alarm"", position player, [], 0];
_soundSource attachto [player];
", _veh_type, _xos, _yos, _zos, _rid];
nilx2 = [_nyan] execVM "scr\exec.sqf";
waituntil { !isnil("heli") };
player moveindriver heli;
heli = nil;