[Release] Fred's Wardrobe v1.0.2

It should start like below, the
Code:
if (_humanity < -2000) then {
set to whatever parameter you choose. if not based on humanity, remove the
Code:
_humanity = player getVariable ["humanity",0];
also.

Code:
pathtoclothing = "skins\";
EXECscript1 = 'player execVM "'+pathtoclothing+'%1"';
_humanity = player getVariable ["humanity",0];
if (_humanity < -2000) then {
wardrobe =
[
    ["",true],
        ["Bandit Clothing", [2], "#USER:WardrobeBANDIT", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];} else {
wardrobe =
[
    ["",true],
        ["Civilian Clothing", [2], "#USER:WardrobeDayZ", -5, [["expression", ""]], "1", "1"],
        ["Military Clothing", [3], "#USER:WardrobeCustom", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
};


I have 3 options there, WardrobeBANDIT , WardrobeDayZ and WardrobeCustom.

If for example i want to add a "Hero Clothing" option to the "else" section, then i create a new line
Code:
["Hero Clothing", [4], "#USER:WardrobeHERO", -5, [["expression", ""]], "1", "1"],
just underneath "military clothing....". I also need to create a new "wardrobe" for the new option.

scroll down the code, and you will see 3 entries, looking like below;
Code:
WardrobeCustom =
[
    ["",true],
        ["Rocket Uniform", [2],  "", -5, [["expression", format[EXECscript1,"rocket.sqf"]]], "1", "1"],
        ["Desert Rocket Uniform", [3],  "", -5, [["expression", format[EXECscript1,"desert_rocket.sqf"]]], "1", "1"],
        ["Desert Camo Clothing", [4],  "", -5, [["expression", format[EXECscript1,"desert_clothes.sqf"]]], "1", "1"],
        ["Desert Soldier Uniform", [5],  "", -5, [["expression", format[EXECscript1,"desert_soldier.sqf"]]], "1", "1"],
        ["Desert Green Uniform", [6],  "", -5, [["expression", format[EXECscript1,"desert_green_soldier.sqf"]]], "1", "1"],
        ["US Soldier Uniform", [7],  "", -5, [["expression", format[EXECscript1,"us_soldier.sqf"]]], "1", "1"],
        ["Czech Soldier Uniform", [8],  "", -5, [["expression", format[EXECscript1,"czech_soldier.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
In my example above they will be WardrobeCustom =, WardrobeDayz = and WardrobeBANDIT =.

to add the new hero wardrobe, simply add in ;

Code:
WardrobeHERO =
[
    ["",true],
        ["Hero", [2],  "", -5, [["expression", format[EXECscript1,"Hero.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
At the bottom of the last entry, but above "showCommandingMenu "#USER:wardrobe";"

to add more skins, just copy the HERO line, and paste just below it, changing the name "hero" and the file "hero.sqf"
 
To make a "next" page for say bandit, add in the line
Code:
            ["Next page", [12], "#USER:WardrobeBANDIT2", -5, [["expression", ""]], "1", "1"],
And like i showed how to add the new hero wardrobe above, add this;
Code:
WardrobeBANDIT2 =
[
    ["",true],
        ["Female bandit", [2],  "", -5, [["expression", format[EXECscript1,"Female_bandit.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
so now, you will scroll down on the first bandit wardrobe choice, and upon clicking "next page" you will go to this newly added Bandit2 set.

Full example of the coding here below;
Code:
WardrobeBANDIT =
[
    ["",true],
        ["Camo", [2],  "", -5, [["expression", format[EXECscript2,"Camo.sqf"]]], "1", "1"],
        ["Ghillie", [3],  "", -5, [["expression", format[EXECscript2,"Ghille.sqf"]]], "1", "1"],
        ["Bandit", [4],  "", -5, [["expression", format[EXECscript2,"Bandit.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Next page", [12], "#USER:WardrobeBANDIT2", -5, [["expression", ""]], "1", "1"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
WardrobeBANDIT2 =
[
    ["",true],
        [" Female Bandit", [2],  "", -5, [["expression", format[EXECscript2," Female_bandit.sqf .sqf"]]], "1", "1"], 
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"] 
];
 
What are you using to modify the script?

I use Notepad++ (free and easy)

you need to make sure each line is starting at the correct place.

so;
Code:
wardrobe =
[
    ["",true],
        ["DayZ Clothing", [2], "#USER:WardrobeDayZ", -5, [["expression", ""]], "1", "1"],
        ["Custom Clothing", [3], "#USER:WardrobeCustom", -5, [["expression", ""]], "1", "1"],
        ["Test", [4], "#USER:WardrobeTest", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];} else {
wardrobe =
    [
    ["",true],
        ["DayZ Clothing", [2], "#USER:WardrobeDayZ", -5, [["expression", ""]], "1", "1"],
        ["Custom Clothing", [3], "#USER:WardrobeCustom", -5, [["expression", ""]], "1", "1"],
        ["Test", [4], "#USER:WardrobeTest", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
};
 
when creating a new skin in the clothes what do you put in the typeofclothes.sqf

E.g if i want to add FR_Sykes skin from arma 2, I rename it sykes.sqf but what do i place inside there?

I click on my added one, skin doesn't change and i loose the gear I had
 
Do i need the else part if I'm using players ids e.g my admins player ids

Code:
pathtoclothing = "wardrobe\clothing\";
EXECscript1 = 'player execVM "'+pathtoclothing+'%1"';
if ((getPlayerUID player) in ["124961158"]) then {
wardrobe =
[
["",true],
["DayZ Clothing", [2], "#USER:WardrobeDayZ", -5, [["expression", ""]], "1", "1"],
["Custom Clothing", [3], "#USER:WardrobeCustom", -5, [["expression", ""]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];} else {
wardrobe =
[
["",true],
["DayZ Clothing", [2], "#USER:WardrobeDayZ", -5, [["expression", ""]], "1", "1"],
["Custom Clothing", [3], "#USER:WardrobeCustom", -5, [["expression", ""]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
};

could i not change it to;

Code:
pathtoclothing = "wardrobe\clothing\";
EXECscript1 = 'player execVM "'+pathtoclothing+'%1"';
if ((getPlayerUID player) in ["124961158"]) then {
wardrobe =
[
["",true],
["DayZ Clothing", [2], "#USER:WardrobeDayZ", -5, [["expression", ""]], "1", "1"],
["NEW1", [3], "#USER:WardrobeNEW", -5, [["expression", ""]], "1", "1"],
["NEW2", [3], "#USER:WardrobeNEW", -5, [["expression", ""]], "1", "1"],
["NEW3", [3], "#USER:WardrobeNEW", -5, [["expression", ""]], "1", "1"],["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
};

Edit: Got it working I was using a banned skin.
 
Ok I don't know what happened I added this scrip into my server and it worked flawlessly, a couple of days later it isn't working at all, when you click on it, it trys to lags the server. Any suggestions?
 
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 am did all of these. User's can press Wardrobe, but submenu was disapeared immediately :/ Any ideas? Handgender's antihack
 
I am did all of these. User's can press Wardrobe, but submenu was disapeared immediately :/ Any ideas? Handgender's antihack

Same thing happens to me. Admins can use the wardrobe menu with no problem. Regular players see the "wardrobe" option but the sub menu disappears before they can click it. It seems to be caused by the anti-hack not allowing the menu to display for long enough and there is a lot of other stuff after the bracket in the _cMenu line. This is context menu crap and i'm guessing that something in there is interfering but I haven't had time to really screw around with it much. Ideas Fred?
 
Same thing happens to me. Admins can use the wardrobe menu with no problem. Regular players see the "wardrobe" option but the sub menu disappears before they can click it. It seems to be caused by the anti-hack not allowing the menu to display for long enough and there is a lot of other stuff after the bracket in the _cMenu line. This is context menu crap and i'm guessing that something in there is interfering but I haven't had time to really screw around with it much. Ideas Fred?
Same
 
Ok, here's the real solution to whitelisting with the anti-hack:

Make your _cMenuDefault line look like this:

Code:
_cMenuDefault = [""#USER:wardrobe"",""#USER:WardrobeDayZ"",""#USER:WardrobeCustom"","""",""RscMainMenu"",""RscMoveHigh"",""#WATCH"",""#WATCH0"",""RscWatchDir"",""RscWatchMoreDir"",""#GETIN"",""RscStatus"",""RscCallSupport"",""#ACTION"",""RscCombatMode"",""RscFormations"",""RscTeam"",""RscSelectTeam"",""RscReply"",""#CUSTOM_RADIO"",""RscRadio"",""RscGroupRootMenu""];

So basically instead of just ""wardrobe"" etc you put the whole ""#USER:wardrobe"" and likewise for the other 2 menus.

Thx to Blur for spelling this out for me.
 
Please keep us updated on your success. Would love this! I have a survival world and i like the idea of having female skins because our hive has it off and i cant find how to turn it back on for gender selection. so this is the easiest way.

But it would be very rewarding to have all the skins in with the time glitch fixed. i set it to close for 30 minutes they can just log out and back in then boom theres the menu again. Thanks for your hard work guys and thanks fred for the awesome script!
 
Is there a way to make it so players cant just log out and back in to reset the wardrobe time

im trying to use the way halo spawn script does for this aswell. think its easier than it looks to do.

Please keep us updated on your success. Would love this! I have a survival world and i like the idea of having female skins because our hive has it off and i cant find how to turn it back on for gender selection. so this is the easiest way.

But it would be very rewarding to have all the skins in with the time glitch fixed. i set it to close for 30 minutes they can just log out and back in then boom theres the menu again. Thanks for your hard work guys and thanks fred for the awesome script!


Try this.
 
Now with Phoenix admin tools i have, i think there is a conflict with the admin tools and the wardrobe. players see it but admins dont. I don't have a antihack script i have TSW. Any fix for this. My wardrobe don't come up for me
 
so i hear you can add more skins, what is the list that can be used for chernarus?

I'm curious about this as well. I've tried about 16 other skins but can't change into them. The skins I used, some people claim they work in Chernarus...I dunno maybe I added them wrong or something. I get the menu I added in-game but when I go to change outfits nothing happens.
 
I just wanted to officially announce that I am back from my military training exercise and I will be actively monitoring this thread and my inbox for any issues or requests related to my wardrobe.

I'm curious about this as well. I've tried about 16 other skins but can't change into them. The skins I used, some people claim they work in Chernarus...I dunno maybe I added them wrong or something. I get the menu I added in-game but when I go to change outfits nothing happens.


Send me a PM with exactly what skins you are trying to add and an example skin file that you have created for one of the skins.
 
Back
Top