Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ################## grave cross script start ##################
- // --------------------player items setparameter
- _playerWeapons = weapons _body;
- _playerMagazines = _magazines;
- // ############# script ##############
- removeAllWeapons _body;
- clearMagazineCargo _body;
- hidebody _body;
- // --------------------Create the tombstone objects.
- _graveBase = createVehicle ["GraveCross2", position _body, [], 0, "NO_COLLIDE"];
- _graveBase setPosATL position _body; // setPos again because arma.
- _graveBase setDir _playerDir;
- // --------------------Create a loot container inside the grave.
- _tempContainer = createVehicle ["weaponHolder", getPosATL _graveBase, [], 1, "can_collide"];
- _containerLoc = getPosATL _tempContainer;
- _containerLoc = [((_containerLoc select 0) + 0),((_containerLoc select 1) + 0),0];
- _tempContainer setPosATL _containerLoc;
- // #### PLAYER items to weaponholder start ####
- // player add weapons
- {
- _tempContainer addWeaponCargoGlobal [_x,1];
- } forEach _playerWeapons;
- // player add items
- {
- _tempContainer addMagazineCargoGlobal [_x,1];
- } forEach _playerMagazines;
- // #### PLAYER items to weaponholder stop ####
- // #### BACKPACK items to weaponsholder start ####
- if (!isNil "_newBackpackType") then {
- if (_newBackpackType != "") then {
- _backpackWpnTypes = [];
- _backpackWpnQtys = [];
- if (count _backpackWpn > 0) then {
- _backpackWpnTypes = _backpackWpn select 0;
- _backpackWpnQtys = _backpackWpn select 1;
- };
- _countr = 0;
- {
- _tempContainer addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
- _countr = _countr + 1;
- } forEach _backpackWpnTypes;
- _backpackmagTypes = [];
- _backpackmagQtys = [];
- if (count _backpackmag > 0) then {
- _backpackmagTypes = _backpackMag select 0;
- _backpackmagQtys = _backpackMag select 1;
- };
- _countr = 0;
- {
- _tempContainer addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)];
- _countr = _countr + 1;
- } forEach _backpackmagTypes;
- };
- };
- // #### BACKPACK items to weaponsholder stop ####
- // #### BACKPACK to weaponsholder start ####
- _backp = createVehicle ["DZ_CivilBackpack_EP1", position _body, [], 4, "can_collide"];
- _backp setPosATL position _body; // setPos again because arma.
- _backp setDir _playerDir;
- // #### BACKPACK to weaponsholder stop ####
- [_graveBase, _tempContainer, _backp] spawn {
- };
- hideBody _body;
- // ################## grave cross script stop ##################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement