Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////// Grave Cross v2.0 Skin Mod /////
- // Grave Cross script by feindfluglp /////
- // Take Clothes script by Zabn ///////////
- // Clothes Drop modded in by Vampire /////
- // If you reuse this script please post //
- // Credits to Zabn and feindfluglp. //////
- //////////////////////////////////////////
- // ################## grave cross script start ##################
- // --------------------player items setparameter
- _playerWeapons = weapons _body;
- _playerMagazines = _magazines;
- _playerSkin = (typeOf _body);
- // ############# script ##############
- removeAllWeapons _body;
- clearMagazineCargo _body;
- hidebody _body;
- // --------------------Create a loot container inside the grave.
- _tempContainer = createVehicle ["weaponHolder", getPosATL _body, [], 0, "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 ####
- // #### PLAYER skin to weaponsholder start ####
- switch (_playerSkin) do {
- case "Survivor3_DZ": {
- _playerSkin = "Survivor2_DZ";
- };
- case "Bandit1_DZ": {
- _playerSkin = "Survivor2_DZ";
- };
- };
- _skinItem = "Skin_" + _playerSkin;
- _okSkin = isClass (configFile >> "CfgMagazines" >> _skinItem);
- if(_okSkin) then {
- _tempContainer addMagazineCargoGlobal [_skinItem,1];
- };
- // #### PLAYER skin to weaponsholder 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 ####
- // help from opendayz: AlienX (simpler code)
- _allowedBackpacks = ["CZ_VestPouch_EP1", "DZ_Patrol_Pack_EP1", "DZ_Assault_Pack_EP1", "DZ_CivilBackpack_EP1",
- "DZ_ALICE_Pack_EP1", "DZ_Backpack_EP1", "DZ_British_ACU", "DZ_Czech_Vest_Puch",
- "DZ_GunBag_EP1", "DZ_TerminalPack_EP1", "DZ_TK_Assault_Pack_EP1", "DZ_LargeGunBag_EP1"];
- _class = typeOf _backpack;
- if (_class in _allowedBackpacks) then { createVehicle [_class, position _body, [], 4, "can_collide"]; };
- // #### BACKPACK to weaponsholder stop ####
- // ### PERMALOOT start ###
- _tempContainer setVariable["permaLoot", true];
- // ### PERMALOOT stop ###
- // --------------------Create the tombstone objects.
- _graveBase = createVehicle ["GraveCross2", position _tempContainer, [], 0, "NO_COLLIDE"];
- _graveBase setPosATL position _tempContainer; // setPos again because arma.
- _graveBase setDir _playerDir;
- [_graveBase, _tempContainer] spawn {
- };
- hidebody _body;
- // ################## grave cross script stop ##################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement