Vehicle Script Help
I found a way to spawn in a vehicle but when i enter it it goes *boom.* All I did was edit the Just-a-box script. Any help please appreciated.
_classname = "UH1H_DZ";
_dir = getdir player;
_pos = getposATL player;
_pos = [(_pos select 0)+1*sin(_dir),(_pos select 1)+1*cos(_dir), (_pos select 2)];
_box = createVehicle [_classname, _pos, [], 3, "CAN_COLLIDE"];
_box setDir _dir;
_box setposATL _pos;
_inventory = [
//"Binocular",
];
titleText [format["Heli spawned nearby."],"PLAIN DOWN"]; titleFadeOut 4;
clearWeaponCargoGlobal _box;
clearMagazineCargoGlobal _box;
clearBackpackCargoGlobal _box;
{_box addBackpackCargoGlobal [_x, 0];} forEach _backpacks;
{_box addWeaponCargoGlobal [_x, 0];} forEach _inventory;
{_box addMagazineCargoGlobal [_x, 0];} forEach _items;
{_box addMagazineCargoGlobal [_x, 0];} forEach _skins;
{_box addWeaponCargoGlobal [_x, 0];} forEach _weapons;
{_box addMagazineCargoGlobal [_x, 0];} forEach _ammo;
{_box addMagazineCargoGlobal [_x, 0];} forEach _explosives;
delaymenu =
[
["",true],
["Select delay", [-1], "", -5, [["expression", ""]], "1", "0"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["No timer", [11], "", -5, [["expression", "DelaySelected=false;"]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [-1], "", -3, [["expression", ""]], "1", "1"]
];
showCommandingMenu "#USER:delaymenu";
WaitUntil{DelaySelected};
DelaySelected=false;
sleep 3;
titleText [format["Heli will disappear in %1 seconds.",SelectDelay],"PLAIN DOWN"]; titleFadeOut 4;
sleep SelectDelay;
deletevehicle _box;
titleText [format["Heli disappeared."],"PLAIN DOWN"]; titleFadeOut 4;
Works on battleye server (YOU NEED BYPASS)