Custom Skins for DayZ 1.8.x.x

Rick167

Member
Hey guys, it's Rick again with another question about custom skins.

I guess I'll start with the back-story.

Before 1.8, I was able to add the following code into the “server_playerLogin.sqf” file:


Code:
switch (_playerID) do {
        case "000000000": { _model = "US_Soldier_EP1"; };
        case "000000000": { _model = "US_Soldier_EP1";};
        default {};
};

Replacing the 0s with my clan member’s UIDs, I was able to have their skins changed from default to US_Soldier_EP1 every time they logged into the server.

This made life easy, as the only alternative I knew about at the time that worked was to manually edit their model in the database to US_Soldier_EP1. The problem with this was that every time they died, I’d have to reassign them the skin.


I had tried creating a custom loadout in the database, however, this was unsuccessful. The items in the loadout worked, but the skin didn’t.

When 1.8 was released, I noticed the server_playerLogin.sqf file was changed quite a bit.
I tried to re-add the code to the new server_playerLogin.sqf, but I was unable to make the soldier skins work anymore.

I want my clan members to be able to wear the “US_Soldier_EP1” skin. This skin (to my knowledge) is still unlocked in the regular DayZ mod.

Does anyone have any ideas on how I could force US_Soldier_EP1 on particular UIDs again?

Thanks,

Rick
 
That's skin isn't unbanned in DayZ as far as I know...

Pastebin the contents of your server_playerLogin.sqf and let me take a look.
 
Thanks for the quick reply.

Here is the old server_playerLogin.sqf file from before 1.8.

http://pastebin.com/fV5eHVb1

For some reason I can't find the new one right now. It's the stock vanilla dayz 1.8.0.3 server_playerLogin.sqf file though.

Also, I'm positive that the skin was unbanned pre-1.8. I'm not sure if they re-banned it since then.
 
I believe this is the current server_playerLogin.sqf file:

http://pastebin.com/Q6Aex9KM

When I looked at the two side-by-side, I noticed huge changes and I wasn't sure exactly how I would set the skins up to work like they did in the old one.

Any ideas? I'd greatly appreciate it.

Rick
 
Correct me if im wrong, but you might just need to add the skin names to this line.
Code:
    if (!(_model in ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","SurvivorW2_DZ"])) then {
        _model = "Survivor2_DZ";
    };
 
Just comment out this line. It will unban all the skins.
Code:
if (!(_model in AllPlayers)) then {
                _model = "Survivor2_DZ";
        };

Then put your code underneath it.

Its checking if the player model is in the AllPlayers array which is defined in the variables.sqf, and if it doesn't match it changes the skin. The array looks like this:
Code:
AllPlayers = ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","Survivor3_DZ"];
 
Hey guys, it turns out I gave you the wrong server_playerLogin.sqf file. God knows how I came up with the wrong one. Silly modding mistake I guess. Sorry about that.

The current server_playerLogin.sqf file is:

http://pastebin.com/dPqcrAuH

It appears that when I commented out lines 121 and 122 (the ones that seemed closest to the ones you had mentioned) I got stuck at retrying authentication when trying to connect.

I'm at a loss now =\

Any ideas?

Thanks much,

Rick
 
Comment out:
Code:
    if (!(_model in ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","SurvivorW2_DZ","US_Soldier_EP1"])) then {
        _model = "Survivor2_DZ";
    };

and uncomment this:
Code:
    } else {
        //if (_model == "") then {
            //_model = "Survivor2_DZ";
        };
    };
 
Pre-1.8 I was able to change people's skins to US_Soldier_EP1 via the database. When they logged in, they were in the soldier skin.

Now that I've got a new server again, I can't even force a skin change to US_Soldier_EP1 via the database. Upon entering the game, it gets stuck at "Requesting Character data from server".

Does this mean that the skin has been officially banned now? :mad:

(Just read your message. Thank you for the very fast reply! I'm going to do as you said right now)
 
Code:
        //if (!(_model in ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","SurvivorW2_DZ","US_Soldier_EP1"])) then {
        //      _model = "Survivor2_DZ";
        //};

Make sure you put a comment before all lines. So like this.

Code:
        //if (!(_model in //["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","Survivo//rW2_DZ","US_Soldier_EP1"])) then {
        //      _model = "Survivor2_DZ";
        //};

If that doesnt work. Try adding that skin to that line without the comments.

EDIT- I guess it looks the same, in my browser it had it on 4 different lines. Needing 4 different // But that should have worked. Try what I suggested. That line I believe is saying if NOT IN THESE SKINS put in SURVIOR2_DZ SKIN.
 
Hey guys, I have good news. I went to bed last night, came back on today, retraced my steps and all the steps you guys gave me in this thread, and managed to get it working. Thanks very much!! :D

I do have one side question if you guys wouldn't mind.

When the switch kicks into effect, we get radios and compasses and such. Is there a way to disable those items from spawning in?

Thanks again!!!

Rick
 
Back
Top