[Release] Fred's Wardrobe v1.0.2

My admin tools doesnt come back after using wardrobe using the above. And ideas? Did i enter it incorrectly?
add a sleep timer like this
[CODE
if ((getPlayerUID player) in ["######","######"]) then {
sleep 5;
player addaction [("<t color=""#0074E8"">" + ("Tools Menu") +"</t>"),"admintools\Eexcute.sqf","",5,false,true,"",""];
};[/CODE]
 
Unsure how I got it to work pal.
Thats fine. Everything seems to working properly now. After adding this and changing the bloodbag to no combat check.

add a sleep timer like this
Code:
if ((getPlayerUID player) in ["######","######"]) then {
sleep 5;
player addaction [("<t color=""#0074E8"">" + ("Tools Menu") +"</t>"),"admintools\Eexcute.sqf","",5,false,true,"",""];
};

Thanks BluePhoenix175 and everyone else who has and probably will help me in the future lol.
 
Thats fine. Everything seems to working properly now. After adding this and changing the bloodbag to no combat check.



Thanks BluePhoenix175 and everyone else who has and probably will help me in the future lol.[/quote
Thats fine. Everything seems to working properly now. After adding this and changing the bloodbag to no combat check.
really? that was causing it? i have been using both those for quite some time now. i deleted admin tools because of antihacks i bought. but before then both worked just fine. did you alterr the bloodbag to only show when under 12000 blood? thats the only change i made to bloodbag that i could think of.
 
really? that was causing it? i have been using both those for quite some time now. i deleted admin tools because of antihacks i bought. but before then both worked just fine. did you alterr the bloodbag to only show when under 12000 blood? thats the only change i made to bloodbag that i could think of.
I just changed the combat check. I think I will be getting rid of self bloodbag anyways.
I would like to add a humanity req for Wardrobe also. I know I saw a post somewhere...
 
In the wardrobe_main.sqf you will see the following code:

Code:
if ((getPlayerUID player) in ["#########"]) 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"]
];
};

In here you could make a UID restriction by replacing "#########" with the UIDs you desired. Then you could just edit the lines under "];}else{" to restrict what everyone else can use. For example, if you want to restrict the custom clothing just delete the line that says Custom Clothing. This could also be set up with a humanity check using the same system.

I am starting to feel like an idiot with this code.

What I wanted to do was create several options.

1. New spawn - Person with generic humanity gets all of the survivor skins to choose from

2. Hero - Person with high humanity gets several soldier-esque skins including hero to choose from.

3. Bandit - Person with low humanity gets several bandity skins including regular bandit to choose from.

4. Donator - person whose unique ID is added so that they get a series of skins as a donor perk

5. Admin - UID added to be able to put on anything and everything.

I started looking at this code to figure it out, and suddenly felt crosseyed lol.

Any suggestions on how I could start making this work?
 
I am starting to feel like an idiot with this code.

What I wanted to do was create several options.

1. New spawn - Person with generic humanity gets all of the survivor skins to choose from

2. Hero - Person with high humanity gets several soldier-esque skins including hero to choose from.

3. Bandit - Person with low humanity gets several bandity skins including regular bandit to choose from.

4. Donator - person whose unique ID is added so that they get a series of skins as a donor perk

5. Admin - UID added to be able to put on anything and everything.

I started looking at this code to figure it out, and suddenly felt crosseyed lol.

Any suggestions on how I could start making this work?




ok this is probably wrong, but what the hey. Im looking through how the debug monitor works with displaying humanity.
Code:
_humanity = player getVariable ["humanity",0];
 
//bandit
if (_humanity < -2500) then {
 
wardrobe =
[
    ["",true],
        ["DayZ Bandit Clothing", [2], "#USER:WardrobeBANDIT", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];};
//newspawn
if (_humanity >= 2500  && _humanity < 6500) then {
wardrobe =
[
    ["",true],
        ["DayZ Survivor Clothing", [2], "#USER:WardrobeSURVIVE", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];};
 
//hero
if (_humanity  > 6500) then {
wardrobe =
[
 
    ["",true],
        ["DayZ Hero Clothing", [2], "#USER:WardrobeHERO", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];};
 
 
 
 
 
 
 
WardrobeHERO =
[
    ["",true],
        //SKINS HERE
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
WardrobeBANDIT =
[
    ["",true],
    //SKINS HERE
 
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
 
WardrobeSURVIVE =
[
    ["",true],
        //SKINS HERE
 
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
To make this work only on a fresh spawn, and logging into an existing character the menu won't appear again;

In your init.sqf, go to the bottom and paste the following;

PHP:
if (!isDedicated) then {
 
waitUntil {!isNil ("dayz_Totalzedscheck") and  !(player getVariable ["humanity",0] > 5000 and typeOf player == "Survivor2_DZ") and !(player getVariable ["humanity",0] < -2000 and (typeOf player == "Survivor2_DZ" or typeOf player == "SurvivorW2_DZ") ) and !(player getVariable ["humanity",0] > 0 and (typeOf player == "Bandit1_DZ" or typeOf player == "BanditW1_DZ") ) };
if (dayzPlayerLogin2 select 2) then
{
    sleep 4;
    [] execVM "wardrobe\wardrobe_activate.sqf";
    };
};

remove the line [] execVM "wardrobe\wardrobe_activate.sqf"; that was added in the original tutorial and if you already have the line "if (!isDedicated) at the end of the init, then you can remove it from the code above and start this underneath any execVM commands you have.
 
This is what I came up with, I was sure it would be messed up, lol can anyone see what I did wrong here?

With the help of friends above I copy paste fiddled with this and what I have is that the scroll option appears, I click wardrobe, and no new menu's appear. They did previous to my fiddling :p

Thanks in advance.
Code:
pathtoclothing = "wardrobe\clothing\";
EXECscript1 = 'player execVM "'+pathtoclothing+'%1"';
//Admin
if ((getPlayerUID player) in ["15702982","59803270","46409798","83342406","29955206","63120454","70191366","83428614","45801222","32482182"]) 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 {
//Donator
if ((getPlayerUID player) in ["97473286"]) then {
wardrobe =
[
    ["",true],
        ["DayZ Clothing", [2], "#USER:WardrobeDayZ", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
           
];} else {
 
_humanity = player getVariable ["humanity",0];
 
//bandit
if (_humanity < -2500) then {
 
wardrobe =
[
    ["",true],
        ["Bandit Wardrobe", [2], "#USER:WardrobeBANDIT", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];
};
 
 
];} else {
 
//hero
if (_humanity  > 6500) then {
wardrobe =
[
 
    ["",true],
        ["Hero Wardrobe", [2], "#USER:WardrobeHERO", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];
};
 
];} else {
 
//newspawn
wardrobe =
[
    ["",true],
        ["Bambi Wardrobe", [2], "#USER:WardrobeSURVIVE", -5, [["expression", ""]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];
};
 
 
 
////////////////////Actual Wardrobes
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"]
];
 
WardrobeDayZ =
[
    ["",true],
        ["Male Suvivor", [2],  "", -5, [["expression", format[EXECscript1,"survivor_male.sqf"]]], "1", "1"],
        ["Female Suvivor", [3],  "", -5, [["expression", format[EXECscript1,"survivor_female.sqf"]]], "1", "1"],
        ["Male Bandit", [4],  "", -5, [["expression", format[EXECscript1,"bandit_male.sqf"]]], "1", "1"],
        ["Female Bandit", [5],  "", -5, [["expression", format[EXECscript1,"bandit_female.sqf"]]], "1", "1"],
        ["Camo Clothing", [6],  "", -5, [["expression", format[EXECscript1,"camo_clothes.sqf"]]], "1", "1"],
        ["Ghillie Suit", [7],  "", -5, [["expression", format[EXECscript1,"ghille.sqf"]]], "1", "1"],
        ["Soldier Uniform", [8],  "", -5, [["expression", format[EXECscript1,"soldier.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
WardrobeHERO =
[
    ["",true],
        //SKINS HERE
        ["Female Suvivor", [3],  "", -5, [["expression", format[EXECscript1,"survivor_female.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
WardrobeBANDIT =
[
    ["",true],
    //SKINS HERE
        ["Male Bandit", [4],  "", -5, [["expression", format[EXECscript1,"bandit_male.sqf"]]], "1", "1"],
        ["Female Bandit", [5],  "", -5, [["expression", format[EXECscript1,"bandit_female.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
 
 
WardrobeSURVIVE =
[
    ["",true],
        //SKINS HERE
        ["Male Suvivor", [2],  "", -5, [["expression", format[EXECscript1,"survivor_male.sqf"]]], "1", "1"],
        ["Female Suvivor", [3],  "", -5, [["expression", format[EXECscript1,"survivor_female.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
            ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
showCommandingMenu "#USER:wardrobe";
 
To make this work only on a fresh spawn, and logging into an existing character the menu won't appear again;

In your init.sqf, go to the bottom and paste the following;

PHP:
if (!isDedicated) then {
 
waitUntil {!isNil ("dayz_Totalzedscheck") and  !(player getVariable ["humanity",0] > 5000 and typeOf player == "Survivor2_DZ") and !(player getVariable ["humanity",0] < -2000 and (typeOf player == "Survivor2_DZ" or typeOf player == "SurvivorW2_DZ") ) and !(player getVariable ["humanity",0] > 0 and (typeOf player == "Bandit1_DZ" or typeOf player == "BanditW1_DZ") ) };
if (dayzPlayerLogin2 select 2) then
{
    sleep 4;
    [] execVM "wardrobe\wardrobe_activate.sqf";
    };
};

remove the line [] execVM "wardrobe\wardrobe_activate.sqf"; that was added in the original tutorial and if you already have the line "if (!isDedicated) at the end of the init, then you can remove it from the code above and start this underneath any execVM commands you have.


This is really great, I attempted to use it, but my other edits appear to be keeping me from truly making sure I did this right.

What I really want to know though is, is it possible to make it so that these things appear every time you log in even if it was a pre-existing character? I don't want people to be able to spam clothing changes during combat or something but I do want them to be able to change when they want to.

How could I make it so that you can use it once every restart?
 
Yeah...i haven't done it myself, but in theory just removing "if (dayzPlayerLogin2 select 2) then" should make it appear every login
 
You can scrub my last message... came to my mind that you don't need to do any of the above to make it appear every login. All you need to do is remove the sleep timer.

Go into every skin.sqf and remove the following from the end;

Code:
sleep 5;
titleFadeOut 1;
sleep 55;
wardrobe = player addaction [("<t color=""#ff8810"">" + ("Wardrobe") +"</t>"),"wardrobe\wardrobe_execute.sqf","",5,false,true,"",""];
};


and change
Code:
titleText ["...looking good! Wardrobe closed for 1 minute.", "PLAIN DOWN", 3];
to something more suitable to the new settings, personally i would just remove " Wardrobe closed for 1 minute."

each skin.sqf is located in the wardrobe\clothing directory
 
The easiest way to only allow select individuals to access the wardrobe menu would be to change your wardrobe_activate.sqf to the following.

Code:
waituntil {!isnull (finddisplay 46)};
sleep 15;
if ((getPlayerUID player) in ["#########","#########"]) then {
wardrobe = player addaction [("<t color=""#ff8810"">" + ("Wardrobe") +"</t>"),"wardrobe\wardrobe_execute.sqf","",5,false,true,"",""];
} else {
player removeAction wardrobe;
};

Then just enter the unique IDs of these select individuals where it says "########", separated by commas. You can put as many as you want there. This will make it so only the unique IDs you have specified will even receive the scroll wheel option for "Wardrobe".

If I want to add multiple unique id's do I repeat the entire code? Or do I just add the id's inside the [ ]'s?

E.G.

if ((getPlayerUID player) in ["123456789","234567891"])

Sorry if this is a basic question.
 
I don't understand how to add next page. Can you give me an example or something. I tried
Code:
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"],
    ["Next page", [12], "#USER:Test", -5, [["expression", ""]], "1", "1"],
    ["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
:p

I think i understand how to add the skins into the menu though.

Sorry still getting new to all this.
 
Trying to add a new menu do i need to copy and paste the lines again. right now it says:
Code:
[
["",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"]
];
};

so do i do
Code:
[
["",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"]
 
wardrobe =
[
["",true],
["DayZ Clothing", [2], "#USER:WardrobeDayZ", -5, [["expression", ""]], "1", "1"],
["Custom Clothing", [3], "#USER:WardrobeCustom", -5, [["expression", ""]], "1", "1"],
NEW WARDROBE LINE HERE
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
 
];
};
 
Back
Top