Français Solved Ajout de plusieurs skins sur la tenue de policier

  • Auteur de la discussion Auteur de la discussion dylan
  • Date de début Date de début

dylan

User
6/4/20
6
0
0
Voici mon dossier fn_init_cop.sqf

#include "..\script_macros.hpp"
/*
File: fn_initCop.sqf
Author: Bryan "Tonic" Boardwine

Description:
Cop Initialization file.
*/
player addRating 9999999;
waitUntil {!(isNull (findDisplay 46))};

if (life_blacklisted) exitWith {
["Blacklisted",false,true] call BIS_fnc_endMission;
sleep 30;
};

[] spawn
{
while {true} do
{
waitUntil {uniform player == "U_B_CombatUniform_mcam_worn"};
player setObjectTextureGlobal [0,"textures\cop_uniform.jpg"];
waitUntil {uniform player != "U_B_CombatUniform_mcam_worn"};
};
};

if (!(str(player) in ["cop_99"])) then {
if ((FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then {
["NotWhitelisted",false,true] call BIS_fnc_endMission;
sleep 35;
};
};
player setVariable ["rank",(FETCH_CONST(life_coplevel)),true];
[] call life_fnc_spawnMenu;
waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.



et voici mon dossier cloting shop

comment faire c'est pour le cop que je voudrais le faire pour ajouter sur les 3 tenue la plusieur skin ?

class cop {
title = "STR_Shops_C_Police";
conditions = "";
side = "cop";
uniforms[] = {
{ "NONE", $STR_C_Remove_uniforms, 0, "" },
{ "U_B_CombatUniform_mcam_worn", $STR_C_Cop_uniforms, 25, "" },
{ "U_B_CombatUniform_mcam_worn", "Tenue Gendarmerie", 350, "call life_coplevel >= 1" },
{ "U_B_CombatUniform_mcam_worn", "Tenue Douane en cours", 550, "call life_coplevel >= 2" },
{ "U_B_CombatUniform_mcam_worn", "Tenue Psig en cours", 1250, "call life_coplevel >= 1" }
};
 
Solution
Hey

Utilise ton fn_playerSkins.sqf tu pourrais faire un truc du style :
Code:
if(playerSide == west) then {
    switch(true) do {
        case (uniform player == "U_Rangemaster") : { // <= le classe name de ta tenue
            if( (call life_coplevel) == 1) then
            {
                player setObjectTextureGlobal [0,"le lien de la texture "]; exemple = textures\cop\matexture.paa
            };
           
            if( (call life_coplevel) == 2) then
            {
                player setObjectTextureGlobal [0,""];
            };
            if( (call life_coplevel) == 3) then
            {
                player setObjectTextureGlobal [0,""];
            };
        };
        case (uniform player ==...
Hey

Utilise ton fn_playerSkins.sqf tu pourrais faire un truc du style :
Code:
if(playerSide == west) then {
    switch(true) do {
        case (uniform player == "U_Rangemaster") : { // <= le classe name de ta tenue
            if( (call life_coplevel) == 1) then
            {
                player setObjectTextureGlobal [0,"le lien de la texture "]; exemple = textures\cop\matexture.paa
            };
           
            if( (call life_coplevel) == 2) then
            {
                player setObjectTextureGlobal [0,""];
            };
            if( (call life_coplevel) == 3) then
            {
                player setObjectTextureGlobal [0,""];
            };
        };
        case (uniform player == "U_B_CombatUniform_mcam") : {
            player setObjectTextureGlobal [0,""];
        };
    };
};
 
Dernière édition:
  • Like
Les réactions: Jean-Baptiste
Solution