[Release] Zabns Take Clothes 2.0

Zabn

Member
Take Clothes
2.0

enables players to take clothes off dead bodies and add the skin to their inventories.

Requirements (inc. Tools(must include dowload link)/ Expected Time/Difficulty)
  • Easy = Blue <10
Installation Steps -

1) in your \dayzinstallfolder\MPMissions\dayz_1.Chernarus folder, create a subfolder called "scripts" or use another name if a folder with other add-on scripts exists.

2) place the file that you've downloaded below into the "scripts" folder

3) now you must create a new fn_selfActions.sqf (you can get this file by opening up your dayz_code.pbo and grabbing it out of your compile folder) to the new "scripts" folder if you dont already have one in there... if you don't make sure to add this line of code:

init.sqf:
Code:
fnc_usec_selfActions = compile preprocessFileLineNumbers "scripts\fn_selfActions.sqf";
just after this code:


init.sqf:
Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
progressLoadingScreen 1.0;

4) add this code:

fn_selfActions.sqf:
Code:
        _clothesTaken = _cursorTarget getVariable["clothesTaken",false];

    // Take clothes by Zabn
    if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {
        if (s_player_clothes < 0) then {
            s_player_clothes = player addAction [("<t color='#0096ff'>")+("Take Clothes")+("</t>"), "scripts\player_takeClothes_v2.sqf",[_cursorTarget], -10, false, true, "",""];
        };
    } else {
        player removeAction s_player_clothes;
        s_player_clothes = -1;
        };

just under this code:

fn_selfActions.sqf:
Code:
//Sleep
    if(_isTent and _ownerID == dayz_characterID) then {
        if ((s_player_sleep < 0) and (player distance _cursorTarget < 3)) then {
            s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",_cursorTarget, 0, false, true, "",""];
        };
    } else {
        player removeAction s_player_sleep;
        s_player_sleep = -1;
    };


5) add this code:

fn_selfActions.sqf:
Code:
    // Take Clothes by Zabn
        player removeAction s_player_clothes;
      s_player_clothes = -1;

just under this code:

fn_selfActions.sqf:
Code:
   player removeAction s_player_studybody;
    s_player_studybody = -1;

7) Battleye filters: open your setvariable.txt and at line 1 add to the end of the line this:

Code:
!="clothesTaken"

8) OPTIONAL: to remove certain skins from being removable, add this:
Code:
case "<SKIN CLASSNAME>": {
    _itemNew = "disabled";
};
(obviously replace the <SKIN CLASSNAME> with the classname of the skin)

under this

Code:
case "Bandit1_DZ": {
    _itemNew = "Survivor2_DZ";
};

9) You're done! enjoy the new script! :)

Credits - Zabn


Discussion \ help thread link
Download Link
 
Last edited:
Top