Remove Clothes from dead bodies!

Churchie

Member
REMOVE CLOTHES FROM A BODY!
This is something we've all wanted to do, but it wasn't possible.
Now it is possible!

Created by: Churchie

Thank you to the contributors to getting it to work are as follows:
| cyrq | Manatee Hunter | Deasil | Seaweeduk | Soul | TheVisad |​


UPDATED AS OF: 04/17/2014 - 8:42pm EST

Change log:
4/21/13 Removed the option to remove clothes from wilderness.
6/30/2013 Added chance to "Tear" clothes.



Known bugs: There is a bug in DayZ 1.7.7.1 where the player logout causes the bodies to dupe. Below is a fix for Reality.
https://github.com/thevisad/DayZ-Private-master/commit/1f9f6b73867c3e9c3408e1237c0c5e8878ab4a67



TIPS:

Tip 1. - Remove Clothes from a Dead body, currently tested on every mod available in DayZ Commander. This script is currently set to allow you to remove a Ghillie, Camo or Civilian clothes from a dead body.

To change the skins allowed to be looted go to line 8 in the clothes.sqf and change them from:

Code:
if( _model in ["Sniper1_DZ","Camo1_DZ","Survivor2_DZ"] ) then { _model = "Skin_" + _model;

TO for Example Celle Mod:
Code:
if( _model in ["Camo1_DZC", "Camo2_DZC", "Camo3_DZC", "Doctor_DZC", "Civ_Soldier_DZC", "Cameraman_DZC", "EuroMan01_DZC", "EuroMan02_DZC", "Storm_Trooper1_DZC", "Storm_Trooper2_DZC", "Storm_Trooper3_DZC", "Storm_Trooper4_DZC", "PrivateSec1_DZC", "PrivateSec2_DZC", "PrivateSec3_DZC", "Asano_DZC", "Hazmat_Black_DZC", "HazmatVest_Black_DZC", "Hazmat_Red_DZC", "HazmatVest_Red_DZC", "Hazmat_Yellow_DZC", "HazmatVest_Yellow_DZC", "Hazmat_Olive_DZC", "HazmatVest_Olive_DZC", "CIV_Pilot1_DZC", "US_Pilot1_DZC", "CZ_Pilot1_DZC", "CZ_Pilot2_DZC", "CZ_Pilot3_DZC", "BAF_Pilot1_DZC", "BAF_Pilot2_DZC", "BAF_Pilot3_DZC", "CZ_Heavy1_DZC", "CZ_Heavy2_DZC", "CZ_Heavy3_DZC", "BAF_Heavy1_DZC", "BAF_Heavy2_DZC", "BAF_Heavy3_DZC", "US_Heavy1_DZC", "US_Heavy2_DZC", "BAF_Officer1_DZC", "BAF_Officer2_DZC", "BAF_Officer3_DZC", "CZ_Officer1_DZC", "CZ_Officer2_DZC", "CZ_Officer3_DZC", "GER_Officer1_DZC", "Soldier1_DZC", "Soldier2_DZC", "Soldier3_DZC", "Soldier1_SF_DZC", "Soldier2_SF_DZC", "Soldier3_SF_DZC", "Snow_Trooper1_DZC", "Snow_Trooper2_DZC", "Sniper1_DZC", "Sniper2_DZC", "Sniper3_DZC"] ) then { _model = "Skin_" + _model;




Tip 2: - If you want to increase or decrease the chance for tearing just change the .04 higher or lower in the clothes.sqf.

*Addition was made possible by Seaweeduk*

Code:
rnd = random 1;
    if (_rnd > 0.4) then {
        _result = [player,_model] call BIS_fnc_invAdd;
    }
    else {
        _model = "Skin_Survivor2_DZ";
        _result = [player,_model] call BIS_fnc_invAdd;
        cutText ["The clothing tears as you try to remove it from the corpse", "PLAIN DOWN"];




Tip 3: - If you have a different folder where you are storing your scripts make sure you change it accordingly! ie: fixes or scripts

Steps to follow on how to install:
  1. Decompress your mission pbo (ie: Dayz.ST- 'dayz_mission.pbo')
  2. Create a 'fixes' folder (used for majority of scripts on opendayz.net)
  3. Create clothes.sqf
  4. Put this code into the clothes.sqf - http://pastebin.com/JMVmjBMb
  5. Save the clothes.sqf file you just created into the 'fixes' folder.
  6. Open fn_selfActions.sqf
Look for:
Code:
if (_isMan and !_isAlive and !_isZombie) 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;
    };

Insert this code below it:

Code:
    //CLOTHES
    if (_isMan and !_isAlive and !_isZombie and !_isAnimal) then {
    if (s_clothes < 0) then {
            s_clothes = player addAction [("<t color=""#FF0000"">" + ("Take Clothes") + "</t>"), "fixes\clothes.sqf",cursorTarget, 1, false, true, "",""];
        };
    } else {
        player removeAction s_clothes;
        s_clothes = -1;
    };

Near the bottom of the fn_SelfActions.sqf you will need to add another two more lines

Look for:

Code:
    player removeAction s_player_studybody;
    s_player_studybody = -1;

and Right after that add this:

Code:
    player removeAction s_clothes;
    s_clothes = -1;


NOW RECOMPILE YOUR MISSION PBO AND YOU ARE DONE!

Now just look at a dead body with a Ghillie, Camo, and/or Civilian and you will see red text saying to "Take Clothes", if you have space in your main inventory it will put it there. Since a body can not be naked even if all you had was Civilian clothes, it will allow you to take an endless amount of Civilian clothes off the body.

Have fun and I hope this will change the DayZ as we know it!
 
Last edited:
Back
Top