Jump to content
stickytoedfrog

Uniform Retexture Help

Recommended Posts

Hello,

I've been trying to edit the default fn_playerSkins.sqf file to add an additional cop uniform. The first retexture being the SWAT one works completely fine however the second one seems to apply an odd mashup to the rangemaster uniform. My code I've been using is as follows.

 

private ["_skinName", "_skinsName"]; //Should make variables


    case west: {
        if (uniform player isEqualTo "U_I_CombatUniform") then { // If player wears "uniform"? then
            _skinName = "textures\swat_uniform.jpg"; // Set actual variable?
            if (LIFE_SETTINGS(getNumber,"cop_extendedSkins") isEqualTo 1) then { // Unsure of use, breaks without it? Possibly checks if extra cop skins are allowed?
                if (FETCH_CONST(life_coplevel) >= 1) then { // Gets player cop level and checks if greater or equal to 1? then
                    _skinName = ["textures\swat_uniform_",(FETCH_CONST(life_coplevel)),".jpg"] joinString ""; // Sets variable... again? joins a string with no spaces for some reason?
                };
            };
            player setObjectTextureGlobal [0, _skinName]; // Sets player skin as variable?
        };
        if (uniform player isEqualTo "U_Rangemaster") then {
            _skinsName = "textures\cop_uniform.jpg";
            if (LIFE_SETTINGS(getNumber,"cop_extendedSkins") isEqualTo 1) then {
                if (FETCH_CONST(life_coplevel) >= 1) then { // Would the two >= 1 be conflicting? I've already tried separating the variables.
                    _skinsName = ["textures\cop_uniform_",(FETCH_CONST(life_coplevel)),".jpg"] ;
                };
            };
            player setObjectTextureGlobal [0, _skinsName];
        };
    };

 

I've added basic comments of what I believe each line is doing off my personal research over the past few days. Any help what so ever would be appreciated!

Edited by stickytoedfrog
Solved, thanks for the help everyone!

Share this post


Link to post
Share on other sites

Is your end goal to end up with a leveled swat uniform (Each rank gets a different one) or are you just trying to set up a general uniform (Each rank gets the same one)? 

@stickytoedfrog

Share this post


Link to post
Share on other sites

I'm just attempting to make two general uniforms, please let me know if you need anymore information! I forgot to mention I'm using the v4 of Altis Life, thanks.

Once I'm back home I can also provide images of my issue if needed.

@res

Edited by stickytoedfrog

Share this post


Link to post
Share on other sites
    case west: {
        if (uniform player isEqualTo "U_I_CombatUniform") then {
            player setObjectTextureGlobal [0, "textures\swat_uniform.jpg"];
        };
		if (uniform player isEqualTo "U_I_CombatUniform_shortsleeve") then {
            player setObjectTextureGlobal [0, "textures\swat_uniform.jpg"];
		};	
    };

Added a short sleeve version for you as well, let me know if you need any extra help @stickytoedfrog

Edited by res
  • Like 1

Share this post


Link to post
Share on other sites

ExtendedSkins basically asks for the basic file name then joinStrings the whitelist number at the end

like 

cop_skin_ joined by 7 joined by .jpg

making

cop_skin_7.jpg

Share this post


Link to post
Share on other sites

Ah I see! Thanks for explaining that to me, so if I have it as cop_uniform.jpeg it is instead searching for cop_uniform_.jpeg? I assume that would be why it applies the first aaf fatigues uniform to the rangemaster uniform instead of the correct jpeg?

Edited by stickytoedfrog
Spelling mistake

Share this post


Link to post
Share on other sites
6 hours ago, stickytoedfrog said:

Ah I see! Thanks for explaining that to me, so if I have it as cop_uniform.jpeg it is instead searching for cop_uniform_.jpeg? I assume that would be why it applies the first aaf fatigues uniform to the rangemaster uniform instead of the correct jpeg?

i think you lost me with what you are asking, but what res posted is how you don't do what i explained haha

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×