[Release] Fred's Wardrobe v1.0.2

but the us soldier for example also gives you a compass, a map and a watch...
not after respawn like the guy in the other thread said... you will get it right after changing clothes...

Also, the "removeWeapon" is only going to happen when the skin change script first runs and I believe the items, even if deleted, will come back after logging out and back in.
 
Fred's Wardrobe v1.0.1

NEW! Added compatibility for antihacks.
It has recently come to my attention that some antihack scripts were conflicting with my wardrobe addon. I have edited all of my files to have full compatibility with antihacks now. Also, thanks to Hangender, for his help and his amazing antihack. I strongly recommend getting a hold of him on skype and looking into purchasing his antihack. You can contact him by searching for Hangender on skype, his profile picture is a blonde girl that he could only get in his dreams. :p
I have updated my github with the edited files. Also, here is a quick tutorial on how to whitelist my wardrobe in Hangender's antihack.
-------------------------------------------------
Step 1: Unpack your dayz_server.pbo.
Step 2: Open your dayz_server folder and locate the compile folder.

Step 3: Open the compile folder and locate the file called code.sqf.

Step 4: Open the code.sqf and find the line that starts with the following.
Code:
_cMenuDefault = [
Step 5: Add the following right after that.
Code:
""WardrobeCustom"",""WardrobeDayZ"",""WardrobeFake"",""wardrobe"",
Step 6: Then find the line that starts with the following.
Code:
_dayzActions =
Step 7: Directly underneath that line you will see a bunch of actions separated by commas. Add the following to the beginning of the list, right after the open bracket.
Code:
wardrobe,
---------------------------------------------------------​
Using my new files I have uploaded to github and following this tutorial has allowed me to successfully use my wardrobe and Hangender's antihack without any issues. I assume that if other antihacks are written similarly then this should work for them as well.
 
I have updated the original post to reflect the changes made in v1.0.1 of my wardrobe. I have also added 6 tutorials for frequently asked questions. All of the tutorials have also been updated to reflect changes for the new version. If you are still using v1.0, I suggest downloading the new files and replacing all of the files from v1.0.
 
Fred, I've noticed you don't have a Terms of Use for this script.

I'd like to ask you if it'd be okay if I restrict use of this script on my server to community members only. (Talking about people who actually join our website, forums, etc.)
 
Fred, I've noticed you don't have a Terms of Use for this script.

I'd like to ask you if it'd be okay if I restrict use of this script on my server to community members only. (Talking about people who actually join our website, forums, etc.)

That sounds like a perfectly valid use to me and I certainly have no problems with it. If you check out the original post I have added some tutorials that should help you out.
 
Also, the "removeWeapon" is only going to happen when the skin change script first runs and I believe the items, even if deleted, will come back after logging out and back in.
if they coming back after relog... the workaround in the other thread would do its job...
remove all items before spawning and then reading in the items out of the db...
i have tested it yesterday... i got them right after changing skins... removed them... they werent added when i relogged...

removing the radio after skinchange is the one thing
but the map, compass and watch... you cant say if they had it before or not...

im curious if someone finds a solution for this...
 
I have added everything to the mission.pbo as described in the tutorial but when I scroll wheel there is no wardrobe to select. Do I have to edit the server.pbo as well to make this work, or is the server.pbo only to make it stick upon re-login/respawn?
 
I am working on other projects right now but the code should look something like this and have not had time to ttest it.

Code:
// -------------------------------------------Item Fix Start-------------------------------------------
private["_hasmapitem","_hascompassitem","_haswatchitem"];
_hasmapitem = "ItemMap" in weapons player;
_hascompassitem = "ItemCompass" in weapons player;
_haswatchitem = "ItemWatch" in weapons player;
// -------------------------------------------Item Fix End-------------------------------------------
if (dayz_combat == 1) then {
titleText ["You can't change clothes while in combat.", "PLAIN DOWN", 3];
sleep 5;
titleFadeOut 1;
} else {
titleText ["Changing Clothes...", "PLAIN DOWN", 3];
sleep 3;
[dayz_playerUID,dayz_characterID,'BAF_Soldier_Officer_DDPM'] spawn player_humanityMorph;
sleep 2;
titleText ["...looking good! Wardrobe closed for 1 minute.", "PLAIN DOWN", 3];
// -------------------------------------------Item Fix Start-------------------------------------------
if (!_hasmapitem ) then {
    player removeWeapon "ItemMap";
};
if (!_hascompassitem ) then {
    player removeWeapon "ItemCompass";
};
if (!_haswatchitem ) then {
    player removeWeapon "ItemMap";
};
player removeWeapon "ItemRadio";
// -------------------------------------------Item Fix End-------------------------------------------
sleep 5;
titleFadeOut 1;
sleep 5;
player addaction [("<t color=""#ff8810"">" + ("Wardrobe") +"</t>"),"wardrobe\skins_execute.sqf","",5,false,true,"",""];
};
 
I have added everything to the mission.pbo as described in the tutorial but when I scroll wheel there is no wardrobe to select. Do I have to edit the server.pbo as well to make this work, or is the server.pbo only to make it stick upon re-login/respawn?

Hmmm. I just did a fresh install on a default mission file, with my updated github files, and everything worked fine. You don't have to touch your server file unless you want the skins to stay persistent. If you want, you can upload your mission file that you attempted to add the wardrobe to and I can look to see what the problem may be.
 
Hmmm. I just did a fresh install on a default mission file, with my updated github files, and everything worked fine. You don't have to touch your server file unless you want the skins to stay persistent. If you want, you can upload your mission file that you attempted to add the wardrobe to and I can look to see what the problem may be.

I guess I have to start with a fresh one as well, my mission.pbo has tow/lift, spawn in camera and all kinds of other stuff added already. I'll try it when I get home with a fresh one and let you know. I'm at work at the moment :)
 
I am working on other projects right now but the code should look something like this and have not had time to ttest it.

Code:
// -------------------------------------------Item Fix Start-------------------------------------------
private["_hasmapitem","_hascompassitem","_haswatchitem"];
_hasmapitem = "ItemMap" in weapons player;
_hascompassitem = "ItemCompass" in weapons player;
_haswatchitem = "ItemWatch" in weapons player;
// -------------------------------------------Item Fix End-------------------------------------------
if (dayz_combat == 1) then {
titleText ["You can't change clothes while in combat.", "PLAIN DOWN", 3];
sleep 5;
titleFadeOut 1;
} else {
titleText ["Changing Clothes...", "PLAIN DOWN", 3];
sleep 3;
[dayz_playerUID,dayz_characterID,'BAF_Soldier_Officer_DDPM'] spawn player_humanityMorph;
sleep 2;
titleText ["...looking good! Wardrobe closed for 1 minute.", "PLAIN DOWN", 3];
// -------------------------------------------Item Fix Start-------------------------------------------
if (!_hasmapitem ) then {
    player removeWeapon "ItemMap";
};
if (!_hascompassitem ) then {
    player removeWeapon "ItemCompass";
};
if (!_haswatchitem ) then {
    player removeWeapon "ItemMap";
};
player removeWeapon "ItemRadio";
// -------------------------------------------Item Fix End-------------------------------------------
sleep 5;
titleFadeOut 1;
sleep 5;
player addaction [("<t color=""#ff8810"">" + ("Wardrobe") +"</t>"),"wardrobe\skins_execute.sqf","",5,false,true,"",""];
};

ok this works so far directly when changing...
on relog you still have the stuff added...

but ill do a quick combining of this workaround here and report back in a few minutes...
EDIT: with this workaround it is also fixed on relog... tested it 3 times now...

@Fred: maybe you can put this in your install description and update the first post?
@dayzpiggd: thanks for sharing your code with us...
 
Hmmm. I just did a fresh install on a default mission file, with my updated github files, and everything worked fine. You don't have to touch your server file unless you want the skins to stay persistent. If you want, you can upload your mission file that you attempted to add the wardrobe to and I can look to see what the problem may be.

OK, got it working with a fresh mission.pbo, I guess some of the other things I have in it causes a conflict.
Thanks again, great script.
 
ok this works so far directly when changing...
on relog you still have the stuff added...

but ill do a quick combining of this workaround here and report back in a few minutes...
EDIT: with this workaround it is also fixed on relog... tested it 3 times now...

@Fred: maybe you can put this in your install description and update the first post?
@dayzpiggd: thanks for sharing your code with us...

I just want to thank dayzpiggd for sharing his fix for items being added to players inventories when changing clothing. Also, thank you to Grafzahl for his tutorial on how to stop custom clothing from adding the items upon logging out and back in, and thanks to Gagi2 for the link.

I have updated the original post to reflect the new changes and I have updated my github with the new clothing files that I added dayzpiggd's fix to. Sorry, for releasing two new versions in two days but I think these are great changes and I appreciate everyones support. I suggest that everyone who wants to stay current with this addon downloads the new files from my github. Also, make sure to check the original post for all of the tutorials I have linked on information to properly edit my addon.
 
OK, got it working with a fresh mission.pbo, I guess some of the other things I have in it causes a conflict.
Thanks again, great script.

I'm glad you were able to get it working and thank you for the kind words.

works for admin on my server but reg players can't use it :(

Is your antihack still blocking the wardrobe for players you haven't whitelisted? Have you downloaded the new files and followed the tutorial to whitelist my wardrobe in your antihack?
 
OK, got it working with a fresh mission.pbo, I guess some of the other things I have in it causes a conflict.
Thanks again, great script.


hey guys, how can i trace and debug conflicts of Fred's wardrobe and othe scrips in my MPMissiion? i have same issue as Zero Cool
 
uh oh Fred... you have a typo in here... ^^
dayzpiggd had it in first place...

Code:
if (!_haswatchitem ) then {
    player removeWeapon "ItemMap";

has to be
Code:
if (!_haswatchitem ) then {
    player removeWeapon "ItemWatch";

or you will have removed the map twice and left the watch in...

so please do a quick update once again... before too many people get the new files from your github... ;)
 
uh oh Fred... you have a typo in here... ^^
dayzpiggd had it in first place...

Code:
if (!_haswatchitem ) then {
    player removeWeapon "ItemMap";

has to be
Code:
if (!_haswatchitem ) then {
    player removeWeapon "ItemWatch";

or you will have removed the map twice and left the watch in...

so please do a quick update once again... before too many people get the new files from your github... ;)

Fixed. Thanks for catching that. :)
 
hey guys, how can i trace and debug conflicts of Fred's wardrobe and othe scrips in my MPMissiion? i have same issue as Zero Cool

What scripts are you guys using? I'm just curious because I'm using around 20 different scripts/addons from this forum and I haven't had any compatibility issues with my wardrobe.
 
Back
Top