Death cross script ??

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
 
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

look at the fn_selfActions where study body is called on, just make another fn_selfActions for _cross = cursorTarget "crossclassnameblahblah"; then
Code:
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
 
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

jeah its a problem ... sry in moment have i not time for fix this and i am not a coder.
i must test for fix this.
 
To add study body is this correct?
I also changed the cross to the one with the helmet


Code:
    _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;
    };
 
Anyone figured out how to make the players skin_ spawn as loot at the gravestone/cross?
I love this script but regulars didn't like they couldn't retrieve the dead players 'clothes'

thx :)
 
I could make something if someone knew what the code was to get the current player model.
I'm assuming it's
model player
 
Poked around humanityMorph and I think you could put a publicvariable catching the value of _model, and then grab that publicvariable on death for the player, but i'm not sure if humanityMorph runs while the server runs unless it is called.
 
What I need is a way to get the player model.
Then I can put that into an array to spit out the right skin into the pile of loot.
There isn't a way to get it unless you pull it from the database which you would have to custom code if your hive supports 999 commands, which most don't.
Otherwise the only option is to find a script that already calls to the database frequently that grabs the model, and use it's variable.

Unless your hive supports 999 custom sql calls the only option is to wait and see if someone can find a script that calls for the player model.
 
player_takeClothes.sqf

// By Zabn 2013 @ BalotaBuddies.net
private["_itemNew","_onLadder","_skin","_body","_okSkin","_clothesTaken","_itemNewName","_result"];
_body = _this select 3;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {cutText ["You can't perform this action while on a ladder!" , "PLAIN DOWN"]};

if (vehicle player != player) exitWith {cutText ["You may not take clothes while in a vehicle", "PLAIN DOWN"]};

player removeAction s_player_clothes;
s_player_clothes = -1;

_skin = (typeOf _body);

_itemNew = _skin;

switch (_itemNew) do {
case "Survivor3_DZ": {
_itemNew = "Survivor2_DZ";
};
case "Bandit1_DZ": {
_itemNew = "Survivor2_DZ";
};
};

_itemNew = "Skin_" + _itemNew;
_okSkin = isClass (configFile >> "CfgMagazines" >> _itemNew);

if(_okSkin) then {
player playActionNow "Medic";
sleep 3;
_clothesTaken = _body getVariable["clothesTaken",false];
if(!_clothesTaken) then {
_itemNewName = getText (configFile >> "CfgMagazines" >> _itemNew >> "displayName");
_result = [player,_itemNew] call BIS_fnc_invAdd;
if (_result) then {
_body setVariable["clothesTaken",true,true];
cutText [format["One %1 has been added to your inventory!",_itemNewName], "PLAIN DOWN"];
} else {
cutText [format["You didn't have enough room to store a %1 :(",_itemNewName], "PLAIN DOWN"];
};
} else {
cutText ["This Skin has already been taken!", "PLAIN DOWN"];
};
} else {
cutText [format["Currently %1 is not supported by the take skin script.",_skin], "PLAIN DOWN"];
 
Didn't think to look in take clothes for it. Duh.

So taking the newest script from here:
http://opendayz.net/threads/release...maloot-v-2-0-german-english.13377/#post-75617

Adding:
Code:
_playerSkin = (typeOf _body);
under
Code:
_playerMagazines = _magazines;

and then adding
Code:
// #### 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 ####
Under
Code:
// #### PLAYER items to weaponholder stop ####

That should work, but I may have forgot something.
Here's a pastebin of the final code:
http://pastebin.com/tvYaBzgZ
 
Vampire my friend... you are a champion :) I'll test it out now... thank you!

edit: works beautifully :) I'll say it again... you're a champion, thank you for this :)

as for not looking in the 'takeClothes.sqf... I spent hours looking through the comref and everywhere else, I'd pretty much given up then slapped myself for being so stupid not to think of it earlier lol
 
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.


Code:
// ################## 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 ##################
Code:
// ################## 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.

happened to me with epoch aswell BP, back pack items and weapons spawn but nothing from the players main inventory like mags and such, never could find a work around for it if someone does it would be very nice as i liked the script and managed to move the variables set on the dead body to the cross so study body/cross works properly on the cross
 
Try changing
Code:
_playerMagazines = _magazines;
to
Code:
_playerMagazines = getMagazineCargo _body;



Nearly working,

Main weapon + secondary weapon spawns.
Items so far spawned : torch, binocs, hatchet

Fails : any food items, flares, bandages, ammo

This is only a 15mins test and these are results so far.
 
Back
Top