Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (_hasBriefs >= _cost) then {
- for "_i" from 0 to _cost - 1 do {
- player removeMagazine _itemUse;
- };
- disableSerialization;
- _display = findDisplay 24;
- (_display) closeDisplay 0;
- _position = [_this select 0, (_this select 1) + 15, _height];
- _chute = createVehicle ["ParachuteMediumEast", _position, [], 0, "FLY"];
- _chutePos = getPosATL _chute;
- _chute setVariable ["ObjectID", ""];
- _box = createVehicle [_boxtype, _chutePos, [], 0, "FLY"];
- _box attachTo [_chute, [0,0,3]];
- _box setVariable ["Mission",1,true];
- _box setVariable ["ObjectID", ""];
- _box setVariable ["permaLoot",true];
- _smoke = "SmokeShellBlue" createVehicle (getPos _box);
- _smoke attachTo [_box, [0,0,0]];
- _var = floor((random 2) + 1);
- lastpack = time;
- //display text to alert user
- _textt = format ["\nCarepackage has spawned!",10];
- titleText [_textt,"PLAIN DOWN"];
- while {getPos _box select 2 > 4} do
- {
- _chute SetVelocity [0,0,_downspeed];
- uiSleep 0.1;
- };
- detach _box;
- _box setPos [getPos _box select 0, getPos _box select 1, 0];
- deleteVehicle _chute;
- // create extra box where old box was, possible loot fix?
- waitUntil {getPos _box select 2 < 1};
- _posATL = getPosATL _box;
- deleteVehicle _box;
- _boxx = _boxtype createvehicle _posATL;
- _smoke attachTo [_boxx, [0,0,0]];
- _boxx setVariable ["Mission",1,true];
- _boxx setVariable ["ObjectID", ""];
- _boxx setVariable ["permaLoot",true];
- clearweaponcargoglobal _boxx;
- clearmagazinecargoglobal _boxx;
- {_boxx addMagazineCargoGlobal [_x, _var];} forEach _givesupplies;
- {_boxx addMagazineCargoGlobal [_x, 1];} forEach _items;
- {_boxx addMagazineCargoGlobal [_x, 1];} forEach _givejackpot;
- {_boxx addWeaponCargoGlobal [_x, 1];} forEach _tools;
- //_boxx addMagazineCargoGlobal [_mag, _var];
- //_boxx addWeaponCargoGlobal [_giveWep, 1];
- {_boxx addWeaponCargoGlobal [_x, 1];} forEach _giveWep;
- uisleep _timeToDelete;
- deleteVehicle _boxx;
- } else {
- _text = format ["\nYou need an Amethyst gem to call a care package!\nAnd you cannot call for a care package in a safe zone!",10];
- titleText [_text,"PLAIN DOWN"];
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement