Remove Clothes from dead bodies!

Ok, it's still is not working and the study body option is gone! I have attached my files below to see if you can spot any silly mistakes I have made.
 

Attachments

  • fn_selfActions.sqf
    15.5 KB · Views: 24
  • compiles.sqf
    24.3 KB · Views: 19
Heh. People mindlessly copy/pasting stuff and still wondering why i doesn't work...:confused:
Ok. To make this as simple as it may be.

fn_selfActions.sqf find:

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;

Under it add:

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

Where clothes\clothes.sqf i the folder inside the mission file and the script name! I don't know where you put yours or how you name them (it can even be yourmom.sqf). Change it properly.

Next find

Code:
player removeAction s_player_studybody;
s_player_studybody = -1;

Under it add:

Code:
    player removeAction s_clothes;
    s_clothes = -1;

Now as i stated before. This is just a simple mock-up which proves that Churchie's script works.
After looking a bit in the clothes.sqf there's is already a statement that defines the acceptable models that can be striped. That's why you don't need the
Code:
if( _model in ["Sniper1_DZ","Camo1_DZ"] ) then
blabla in the selfActions.
Also, I'm no pro. If someone has an idea or says that I'm wrong then I'll be more then happy to read their post.
 
cyrq, I have already followed these instructions, and if you look inside the files I attached to the previous post, I have no mistakes that I can see.

It appears to be working for others, and I have a decent grasp of coding but I am unable to see a fault.

Just to clarify,

I have moved my compiles & selfactions sqfs into my mission.pbo, in a folder named /fixes.

In my init.sqf I have changed the compile call path to reflect this:

call compile preprocessFileLineNumbers "fixes\compiles.sqf"; //Compile regular functions

In compiles.sqf I have inserted this line at the end of the //actions section

s_clothes = compile preprocessFileLineNumbers "Scripts\clothes.sqf";

I have also inserted the code you provided into the selfactions.sqf

Where am I going wrong?!

 
There is two ways to fix it LexGaming. 1: you can have a massive Banlist for BE and delete the Scripts.txt file. Or 2: you can comment out line 37 to 43 depending how many other lines you have commented prior. I have submitted a help ticket to BE for a request a fix for the line needed to be added to allow this script. We will see.
 
so iam guessing no one knows why I am the only one that sees the option to remove clothes on my server and no one else can
 
All working good now, but I am wondering if it is possible to make Hero & Bandit skins lootable also?
 
Since the Hero and Bandit Skins are not a "Dropped" item, there is no package, it is not viable as of yet. I have already looked into it. Will Keep you updated on it. I am still working on finding out what Battleye says about the script restriction. I believe it is two scripts that are causing issues, but to tell you which knows right now I don't have an answer. Does the script work, yes. Is it 100% that is a big NO.
 
istealth, we can see the remove clothes option, but when you actually take the clothes Battleye kicks you for script restriction.
 
istealth, we can see the remove clothes option, but when you actually take the clothes Battleye kicks you for script restriction.
none of my players can see it just me and when i do it i dont get kicked by battleeye and i do get the skin
 
istealth probably added this script in the dayz mod and not in the mission file.
that's my guess.
 
either way, istealth I'd recommend to start from fresh. I am about to start my post on how to install it all. I wish I could fix the BE kicks. :(
 
Its strange, it lets some players loot the clothes ok, but then kicks others for the setpos kicks...
 
Just an thought I had whilst modifying the self bloodbag script to add a chance of infection...
Could we combine this with the dead body's age/temperature setting used in King2K's study body script so that wearing clothes you've pulled off a rotting corpse might give you a bit of a cough?
 
istealth probably added this script in the dayz mod and not in the mission file.
that's my guess.
Iam sure i did not add it to the dayz mod it is in my fixes folder in my mission file
 

Attachments

  • fn_selfActions.sqf
    18.5 KB · Views: 20
Back
Top