Jump to content

Adding Cop Uniforms


Recommended Posts

Hi! I am currently using Arma 3 Altis Life 5.0 but I am not able to get Cop uniforms to work. This below is my fn_playerskin

#include "..\..\script_macros.hpp"
/*
    File: fn_playerSkins.sqf
    Author: Daniel Stuart

    Description:
    Sets skins for players by their side and uniform.
*/
private ["_skinName"];

switch (playerSide) do {
    case civilian: {
        if (LIFE_SETTINGS(getNumber,"civ_skins") isEqualTo 1) then {
            if (uniform player isEqualTo "U_C_Poloshirt_blue") then {
                player setObjectTextureGlobal [0, "textures\civilian_uniform_1.jpg"];
            };
            if (uniform player isEqualTo "U_C_Poloshirt_burgundy") then {
                player setObjectTextureGlobal [0, "textures\civilian_uniform_2.jpg"];
            };
            if (uniform player isEqualTo "U_C_Poloshirt_stripped") then {
                player setObjectTextureGlobal [0, "textures\civilian_uniform_3.jpg"];
            };
            if (uniform player isEqualTo "U_C_Poloshirt_tricolour") then {
                player setObjectTextureGlobal [0, "textures\civilian_uniform_4.jpg"];
            };
            if (uniform player isEqualTo "U_C_Poloshirt_salmon") then {
                player setObjectTextureGlobal [0, "textures\civilian_uniform_5.jpg"];
            };
            if (uniform player isEqualTo "U_C_Poloshirt_redwhite") then {
                player setObjectTextureGlobal [0, "textures\civilian_uniform_6.jpg"];
            };
            if (uniform player isEqualTo "U_C_Commoner1_1") then {
                player setObjectTextureGlobal [0, "textures\civilian_uniform_7.jpg"];
            };
        };
    };

    case west: {
        if (uniform player isEqualTo "U_Rangemaster") then {
            _skinName = "textures\uniform\police_cadet.jpg";
            if (LIFE_SETTINGS(getNumber,"cop_extendedSkins") isEqualTo 1) then {
                if (FETCH_CONST(life_coplevel) >= 1) then {
                    _skinName = ["textures\Polis_Cadet",(FETCH_CONST(life_coplevel)),".paa"] joinString "";
                };
            };
            player setObjectTextureGlobal [0, _skinName];
        };
    };

    case independent: {
        if (uniform player isEqualTo "U_Rangemaster") then {
            player setObjectTextureGlobal [0, "textures\medic_uniform.jpg"];
        };
    };
};

Link to comment
Share on other sites

this is mine, and it works 

 

case west: {
        if (uniform player isEqualTo "U_Rangemaster") then {
            _skinName = "textures\Cop\cop_uniform.paa";      --- Change me 
        };

        player setObjectTextureGlobal [0, _skinName];
    };

      if(backpack player != "") then {
            unitBackpack player setObjectTextureGlobal [0, ""];
        };

        player setObjectTextureGlobal [0, _skinName];
    };
 

    case independent: {
        if (uniform player isEqualTo "U_B_CTRG_1") then {      --- Change me                                    
            player setObjectTextureGlobal [0, "textures\Medic\medic.paa"];
        };
        if(backpack player != "") then {      
            unitBackpack player setObjectTextureGlobal [0, ""];
        };
    };
};

 

included is a working invisible bag pack, note the "change me" areas

Edited by House.M
Link to comment
Share on other sites

10 hours ago, House.M said:

this is mine, and it works 

 

case west: {
        if (uniform player isEqualTo "U_Rangemaster") then {
            _skinName = "textures\Cop\cop_uniform.paa";      --- Change me 
        };

        player setObjectTextureGlobal [0, _skinName];
    };

      if(backpack player != "") then {
            unitBackpack player setObjectTextureGlobal [0, ""];
        };

        player setObjectTextureGlobal [0, _skinName];
    };
 

    case independent: {
        if (uniform player isEqualTo "U_B_CTRG_1") then {      --- Change me                                    
            player setObjectTextureGlobal [0, "textures\Medic\medic.paa"];
        };
        if(backpack player != "") then {      
            unitBackpack player setObjectTextureGlobal [0, ""];
        };
    };
};

 

included is a working invisible bag pack, note the "change me" areas

I will try it. 

You can reach me on Discord: Ljungaan#5822

Link to comment
Share on other sites

Update - Solved 

Issue was the work uniform was being used, resulting in the texture not being applied the right way. a change in the "fn_playerskins.sqf" was made as show below. the file type was also updated from "jpeg" to "paa".

 case west: {
        if (uniform player isEqualTo "U_C_IDAP_Man_cargo_F") then {
            _skinName = "textures\Cop\cop_uniform.paa";
            if (LIFE_SETTINGS(getNumber,"cop_extendedSkins") isEqualTo 1) then {
                if (FETCH_CONST(life_coplevel) >= 1) then {
                    _skinName = ["textures\cop_uniform_",(FETCH_CONST(life_coplevel)),".paa"] joinString "";
                };
            };
            player setObjectTextureGlobal [0, _skinName];
        };
    };

An update to "fn_CopLoadout.sqf" was also done, so that done too as shown below.

 

//Load player with default cop gear.
player addUniform "U_C_IDAP_Man_cargo_F";
player addVest "V_Rangemaster_belt";

player addMagazine "16Rnd_9x21_Mag";
player addWeapon "hgun_P07_snds_F";
player addMagazine "16Rnd_9x21_Mag";
player addMagazine "16Rnd_9x21_Mag";
player addMagazine "16Rnd_9x21_Mag";
player addMagazine "16Rnd_9x21_Mag";
player addMagazine "16Rnd_9x21_Mag";

 

 

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.

×
×
  • Create New...

Important Information

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