Hi im trying to make a script that changes a players skin to a rocker skin with out loosing his backpack
Here is my code
private ["_bagType","_bagMagazines","_bagWeapons","_array1","_array2"];
_unitBag = unitBackpack player;
_bagType = typeOf _unitBag;
_bagWeapons = getWeaponCargo _unitBag;
_bagMagazines = getMagazineCargo _unitBag;
removeBackpack (vehicle player);
sleep 1;
[dayz_playerUID,dayz_characterID,'Rocker2'] spawn player_humanityMorph;
sleep 1;
if(_bagType == "CZ_VestPouch_EP1" || _bagType == "DZ_LargeGunBag_EP1" || _bagType == "DZ_ALICE_Pack_EP1" || _bagType == "DZ_Assault_Pack_EP1" || _bagType == "DZ_Backpack_EP1" || _bagType == "DZ_British_ACU" || _bagType == "DZ_CivilBackpack_EP1" || _bagType == "DZ_Czech_Vest_Pouch" || _bagType == "DZ_Patrol_Pack_EP1" || _bagType == "DZ_TK_Assault_Pack_EP1" || _bagType == "DZ_GunBag_EP1" || _bagType == "DZ_CompactPack_EP1" || _bagType == "DZ_TerminalPack_EP1") then {
(vehicle player) addBackpack _bagType;
sleep 0.1;
_array1 = _bagWeapons select 0;
_array2 = _bagWeapons select 1;
for [{_i=0}, {_i < count _array1}, {_i=_i+1}] do
{
(unitBackpack player) addWeaponCargo [(_array1 select _i),(_array2 select _i)];
}forEach ARRAY;
_array1 = _bagMagazines select 0;
_array2 = _bagMagazines select 1;
for [{_i=0}, {_i < count _array1}, {_i=_i+1}] do
{
(unitBackpack player) addMagazineCargo [(_array1 select _i),(_array2 select _i)];
}forEach ARRAY;
};
i think my problem is that the sleep funtion don't work wile using player_humanityMorph
if i make this.
It takes off my backpack and put it on again.
sleep 1; //[dayz_playerUID,dayz_characterID,'Rocker2'] spawn player_humanityMorph; sleep 1;
Hope some one can help me :)

