Help needed with models for certain people

On my server I'm looking to apply certain skins to certain people to differentiate different factions. In order to do this I added
Code:
if ((getPlayerUID player) in ["118875142","112928774","75487622","118248966","60222918","2842624","88739718","70500486","111248902"]) then { //all groups
    if ((getPlayerUID player) in ["118875142","112928774","75487622","118248966","60222918","2842624"]) then { //freelancers green desert
        _model = "BAF_Soldier_MTP";
    };
    if ((getPlayerUID player) in ["88739718","70500486","111248902"]) then { //dezitians us army
        _model = "US_Soldier_EP1";
    };
};
to my server_playerlogin.sqf and it worked, however I soon realized that this meant logging off with a ghillie suit or camo clothing on would cause them to be lost. In order to remedy this I changed the code to
Code:
if ((getPlayerUID player) in ["118875142","112928774","75487622","118248966","60222918","2842624","88739718","70500486","111248902"]) then { //all groups
    if ((getPlayerUID player) in ["118875142","112928774","75487622","118248966","60222918","2842624"]) && !(_model in ["Sniper1_DZ","Camo1_DZ"]) then { //freelancers green desert
        _model = "BAF_Soldier_MTP";
    };
    if ((getPlayerUID player) in ["88739718","70500486","111248902"]) && !(_model in ["Sniper1_DZ","Camo1_DZ"]) then { //dezitians us army
        _model = "US_Soldier_EP1";
    };
};
Which doesn't seem to work and I can't figure out why. I've played with it for the last hour and I can't seem to figure out what's wrong with it. Would somebody mind giving me a hand with this?
 
try taking out this part in your if.
Code:
!(_model in ["Sniper1_DZ","Camo1_DZ"])

see if that works... i think
Code:
(_model !isin ["Sniper_DZ","Camo1_DZ"])
 
I recently realized that this wasn't the best way to go about doing it because anyone who switched a ghillie suit off would be wearing regular civies again. To remedy that I decided to use a method akin to how bandit and hero skins are applied by through the player_changeclothes.sqf. I'll post an update if I get anywhere with that.
 
I recently realized that this wasn't the best way to go about doing it because anyone who switched a ghillie suit off would be wearing regular civies again. To remedy that I decided to use a method akin to how bandit and hero skins are applied by through the player_changeclothes.sqf. I'll post an update if I get anywhere with that.

i would be very interested in your findings. i never went any further into figuring this problem out. currently my players understand they lose guillies/camo upon logging out. some feel its worth it to have custom skins. nice work at trying to find a solution
 
Works as expected, by overwriting the player_wearClothes.sqf and adding an if statement to the survivor skin it's possible to change the default skin for certain people to whatever works.
I changed this:
Code:
switch (_item) do {
    case "Skin_Sniper1_DZ": {
        _model = "Sniper1_DZ";
    };
    case "Skin_Camo1_DZ": {
        _model = "Camo1_DZ";
    };
    case "Skin_Soldier1_DZ": {
        _model = "Soldier1_DZ";
    };
    case "Skin_Survivor2_DZ": {
        _model = "Survivor2_DZ";
        if (_isBandit) then {
            _model = "Bandit1_DZ";
        };
        if (_isHero) then {
            _model = "Survivor3_DZ";
        };
    };
};
to this
Code:
switch (_item) do {
case "Skin_Sniper1_DZ": {
_model = "Sniper1_DZ";
};
case "Skin_Camo1_DZ": {
_model = "Camo1_DZ";
};
case "Skin_Soldier1_DZ": {
_model = "Soldier1_DZ";
};
case "Skin_Survivor2_DZ": {
_model = "Survivor2_DZ";
if (_isBandit) then {
_model = "Bandit1_DZ";
};
if (_isHero) then {
_model = "Survivor3_DZ";
};
if ((getPlayerUID player) in ["118875142","118628102","82079046","34760838","88739718","70500486","111248902","112928774","75487622","118248966","60222918","2842624"]) then {
if ((getPlayerUID player) in ["88739718","70500486","111248902"]) then {
_model = "US_Soldier_EP1";
};
if ((getPlayerUID player) in ["34760838","112928774","75487622","118248966","60222918","2842624"]) then {
_model = "BAF_Soldier_MTP";
};
if ((getPlayerUID player) in ["118875142","118628102","82079046"]) then {
_model = "RUS_Soldier_Base";
};
};
};
};
Side note: it's also possible to overwrite the player_switchModel.sqf to stop radios from being added to inventory.
 
Hey RaveyPooPoo,
Can you tell me where exactly did you put this code:
Code:
[FONT=Consolas]if ((getPlayerUID player) in ["118875142","112928774","75487622","118248966","60222918","2842624","88739718","70500486","111248902"]) then { //all groups
    if ((getPlayerUID player) in ["118875142","112928774","75487622","118248966","60222918","2842624"]) then { //freelancers green desert
        _model = "BAF_Soldier_MTP";
    };
    if ((getPlayerUID player) in ["88739718","70500486","111248902"]) then { //dezitians us army
        _model = "US_Soldier_EP1";
    };
};
[/FONT]
in your server_playerLogin.sqf?
Thanks, J3T
 
Hey RaveyPooPoo,
Can you tell me where exactly did you put this code:
Code:
[FONT=Consolas]if ((getPlayerUID player) in ["118875142","112928774","75487622","118248966","60222918","2842624","88739718","70500486","111248902"]) then { //all groups
    if ((getPlayerUID player) in ["118875142","112928774","75487622","118248966","60222918","2842624"]) then { //freelancers green desert
        _model = "BAF_Soldier_MTP";
    };
    if ((getPlayerUID player) in ["88739718","70500486","111248902"]) then { //dezitians us army
        _model = "US_Soldier_EP1";
    };
};
[/FONT]
in your server_playerLogin.sqf?
Thanks, J3T


IIRC I had it right after
Code:
_isHiveOk = false;    //EDITED
if (_hiveVer >= dayz_hiveVersionNo) then {
    _isHiveOk = true;
};

Though I wouldn't recommend doing it this way as there are better methods.
 
Mh... your code doesn't seem to work. No Errormessage just no specific skin.
I edited more UID in this part
Code:
if ((getPlayerUID player) in ["118875142","112928774","75487622","118248966","60222918","2842624","88739718","70500486","111248902"]) then { //all groups
than i used in the following parts. could that be the reason why it won't work?
 
easiest way to achieve this is to set the skin on new characters. Not during login. server_playerSetup.sqf
 
then you need to add the checks to dayz_code\actions\player_wearClothes.sqf too
 
Ravey i post you my file as soon as i can. Coudn't reach my computer during the week so tonight i'll get you the files. Thanks for your help.
 
Back
Top