Jump to content

Is Multiple cop uniform classes possible?


Recommended Posts

I’m trying to add multiple classes of uniform for my cops on my life server. Currently they have a retextured U_rangemaster uniform, and I’m trying to add a retextured  “U_B_CombatUniform_mcam” for my highest level cop only. Do I need to create a new class/license/faction for this (maybe a swat license or something?) or is it possible to add multiple uniform classes for one faction?

Link to comment
Share on other sites

2 hours ago, Johnny Grog said:

I’m trying to add multiple classes of uniform for my cops on my life server. Currently they have a retextured U_rangemaster uniform, and I’m trying to add a retextured  “U_B_CombatUniform_mcam” for my highest level cop only. Do I need to create a new class/license/faction for this (maybe a swat license or something?) or is it possible to add multiple uniform classes for one faction?

for that you can use the CopLevel or create a license in the Config_License

Link to comment
Share on other sites

For the cop level you should check in the database if you have it added.
image.thumb.png.3fb31e427c8ef280199c8e2c30ad41de.png

you should have something like this.

 

To create a swat license just go to config/Config_Licenses and create one for cop.

And then you only have to put as a condition when buying the clothes "call life_coplevel >= 7 number chosen for the Swat" or "licence_cop_Swat" for example.

Edited by LoSantos_YT
Link to comment
Share on other sites

Posted (edited)
1 hour ago, LoSantos_YT said:

For the cop level you should check in the database if you have it added.
image.thumb.png.3fb31e427c8ef280199c8e2c30ad41de.png

you should have something like this.

 

To create a swat license just go to config/Config_Licenses and create one for cop.

And then you only have to put as a condition when buying the clothes "call life_coplevel >= 7 number chosen for the Swat" or "licence_cop_Swat" for example.

So I checked and I am level 7 in the DB. Here is my config_Clothing.hpp:

 

{ "U_B_CTRG_3", "CTSFO Operator", 0, "call life_coplevel >= 7" }

 

And here is my fn_playerSkins.sqf:

case west: {
        if (LIFE_SETTINGS(getNumber,"cop_extendedSkins") isEqualTo 1) then {
            if (uniform player isEqualTo "U_Rangemaster") then {
            player setObjectTextureGlobal [0, "textures\cop_uniform.jpg"];
            };
            if (uniform player isEqualTo "U_B_CTRG_3") then {
                player setObjectTextureGlobal [0, "textures\ctsfo.jpg"];                         
               };
            player setObjectTextureGlobal [0, _skinName];
        };
    };  

Config_Master has cop_extendedskins set to true. 

What am I missing? any help greatly appreciated!

 

Edited: when I go into game with the above code, I spawn with the untextured rangemaster skin

Untitled2.thumb.png.e81c7fb90fd36682f5ad56dc8a60b56c.png

And when I purchase the CTRG uniform, it also is untextured. I have the correct paths in place and the right levels assigned. Is there something wrong with the code? As that is not my strong point. 

Untitled1.thumb.png.af1aa523ecdd21a98ac17a7be120ce80.png

Edited by Johnny Grog
Added pics
Link to comment
Share on other sites

  • 3 months later...

Hi, So if you're Still trying to fix this, I changed the script to work for my server, Should hopefully help you make some progress.

 

I don't have "cop_extendedSkins" on, But Change "U_B_CombatUniform_mcam" To match your Uniform Class for your main Uniforms (im guessing you're keeping Range Master).

As I was using a Different uniform (Like you are) i just created another if Statement just further out basically doing the same checks but for a different uniform.

The Bottom "if(backpack player != "") then {" is for invisble Backpacks if you want them aswell

Spoiler

case west: {
        if (uniform player isEqualTo "U_B_CombatUniform_mcam") then {
            _skinName = "textures\Police\police_pcso_uniform.paa";
            if (LIFE_SETTINGS(getNumber,"cop_extendedSkins") isEqualTo 0) then {
                if (FETCH_CONST(life_coplevel) <= 3) then {
                    _skinName = ["textures\Police\police_pcso_uniform.paa"] joinString "";
                };
                if (FETCH_CONST(life_coplevel) >= 3) then {
                    _skinName = ["textures\Police\scotpol_blackuniform.paa"] joinString "";
                };
            player setObjectTextureGlobal [0, _skinName];
        };    
    };
    
    if (uniform player isEqualTo "U_B_CTRG_1") then {
                _skinName = "textures\Police\CTSFO.paa";    
                player setObjectTextureGlobal [0, _skinName];
                };
                
        if(backpack player != "") then {
            unitBackpack player setObjectTextureGlobal [0, ""];
            [unitBackpack player,0,""] remoteExec ["life_fnc_setTexture",RCLIENT];
        };
    };

For yours it should be something like:

 

case west: {
        if (uniform player isEqualTo "U_Rangemaster") then {
            _skinName = "textures\cop_uniform.jpg";
            player setObjectTextureGlobal [0, _skinName];  
        };
    
    if (uniform player isEqualTo "U_B_CTRG_1") then {
                _skinName = "textures\Police\CTSFO.paa";    
                player setObjectTextureGlobal [0, _skinName];
           }; 
    };


If This doesnt work, Send me your Discord & ill help you further on there!

Edited by PG Wisdom
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.