Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hm sry i can´t this ... i am not a coder
i have many test and for me its not realy easy to make this
other peopel idea where can i add a study body? or death message? i add this too my script
if (_cross and !_isAlive) then {
// study body crap goes here
You can fix the problem by killing the player on the roof of the hospital there is a cross on the ground and not on the roof? Cross appears only on the ground level and the majority in the texture of the building
_cross = cursorTarget isKindOf "GraveCrossHelmet";
// Study Body
if (_player_studybody && _cross && !_isAlive) then {
if (s_player_studybody < 0) then {
s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",_cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_studybody;
s_player_studybody = -1;
};
_playerSkin = (typeOf _body);
_playerMagazines = _magazines;
// #### 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 ####
// #### PLAYER items to weaponholder stop ####
// ################## 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 ["GraveCrossHelmet_EP1", 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, [], 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 ####
// #### 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 ####
// ### vanilla dayz ###
_class = typeOf _backpack;
if (_class == "CZ_VestPouch_EP1") then {createVehicle ["CZ_VestPouch_EP1", position _body, [], 2, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Patrol_Pack_EP1") then {createVehicle ["DZ_Patrol_Pack_EP1", position _body, [], 2, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Assault_Pack_EP1") then {createVehicle ["DZ_Assault_Pack_EP1", position _body, [], 2, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_CivilBackpack_EP1") then {createVehicle ["DZ_CivilBackpack_EP1", position _body, [], 2, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_ALICE_Pack_EP1") then {createVehicle ["DZ_ALICE_Pack_EP1", position _body, [], 2, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Backpack_EP1") then {createVehicle ["DZ_Backpack_EP1", position _body, [], 2, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_British_ACU") then {createVehicle ["DZ_British_ACU", position _body, [], 2, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Czech_Vest_Puch") then {createVehicle ["DZ_Czech_Vest_Puch", position _body, [], 2, "can_collide"];};
[_graveBase, _tempContainer] spawn {
};
hideBody _body;
// ################## grave cross script stop ##################
// ################## grave cross script start ##################
// --------------------player items setparameter
_playerWeapons = weapons _body;
_playerMagazines = _magazines;
// ############# 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 ####
// #### 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"];
_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 ["GraveCrossHelmet_EP1", 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 ##################
Having problems with this script on DayZ 1.8.0.3.
The grave is spawning, no problems.
Its the loot the problem, only guns spawn nothing else.
No ammo or items, nothing but guns.
Try changing
toCode:_playerMagazines = _magazines;
Code:_playerMagazines = getMagazineCargo _body;