Abend,
ich habe folgendes Problem:
ich möchte nun rangabhängige Skins für Cops einfügen, jedoch hab ich das Problem, dass dies sich dem rang einfach nicht anpasst...
Also ich bekomme einfach immer die Kleidung mit dem Rang 1, alle diese Skins haben die gleiche U_Rangemaster Uniform, es wird halt nur das rangabzeichen anders bei den verschiedenen skins.
in der Config_Clothing sieht der Cop Shop so aus:
Spoiler anzeigen
Code
class cop {
title = "STR_Shops_C_Police";
conditions = "";
side = "cop";
uniforms[] = {
{ "NONE", $STR_C_Remove_uniforms, 0, "" },
{ "U_Rangemaster", "Streifenkleidung", 2, "" },
{ "U_IG_Guerrilla_6_1", "Leitungskleidung", 2, "call life_coplevel > 6" },
{ "U_O_V_Soldier_Viper_hex_F", "Sondereinsatz", 2, "" },
{ "U_I_pilotCoveralls", "Pilotenkleidung", 2, "" },
{ "U_B_Wetsuit", "Taucherkleidung", 2, "" },
{ "U_IG_Guerrilla_6_1", "Adminkleidung", 2, "call life_coplevel > 6"}
};
headgear[] = {
{ "NONE", $STR_C_Remove_headgear, 0, "" },
{ "H_Cap_police", "Police Cap", 2, "" },
{ "H_Watchcap_blk", "Beanie", 2, "" },
{ "H_PASGT_basic_blue_F", "", 2, "" },
{ "H_PASGT_basic_black_F", "", 2, "" },
{ "H_Beret_blk_POLICE", "Barret Black", 2, "" }, //Barret
{ "H_Beret_Colonel", "Barret Colonel", 2, "" }, //Barret Gold
{ "H_Beret_02", "Barret Nato", 2, "" }, //Barret Blau
{ "H_CrewHelmetHeli_B", "Gasmaske", 2, "" },
{ "H_PilotHelmetFighter_O", "Gasmaske", 2, "" },
{ "H_MilCap_oucamo", "", 2, "" },
{ "H_HelmetB_plain_mcamo", "", 2, "" },
{ "H_HelmetB_Enh_tna_F", "", 2, "" }
};
goggles[] = {
{ "NONE", $STR_C_Remove_goggles, 0, "" },
{ "G_Squares", "", 2, "" },
{ "G_Shades_Blue", "", 2, "" },
{ "G_Sport_Blackred", "", 2, "" },
{ "G_Sport_Checkered", "", 2, "" },
{ "G_Sport_Blackyellow", "", 2, "" },
{ "G_Sport_BlackWhite", "", 2, "" },
{ "G_Shades_Black", "", 2, "" },
{ "G_Lowprofile", "", 2, "" },
{ "G_Combat", "", 2, "" },
{ "G_Aviator", "", 2, "" },
{ "G_Lady_Mirror", "", 2, "" },
{ "G_Lady_Dark", "", 2, "" },
{ "G_Lady_Blue", "", 2, "" }
};
vests[] = {
{ "NONE", $STR_C_Remove_vests, 2, "" },
{ "V_Safety_yellow_F", "", 2, "" },
{ "V_LegStrapBag_black_F", "", 2, "" },
{ "V_Pocketed_black_F", "", 2, "" },
{ "V_TacVest_blk_POLICE", "", 2, "" },//Cad, Officer
{ "V_RebreatherB", "", 2, "" }, //taucherweste
{ "V_PlateCarrier1_blk", "", 2, "" },//Corp+
{ "V_PlateCarrier2_blk", "", 2, "" },//Det+
{ "V_PlateCarrierSpec_blk", "Ich bin OP", 2, "" }//ich bin op
};
backpacks[] = {
{ "NONE", $STR_C_Remove_backpacks, 2, "" },
{ "B_FieldPack_cbr", "", 2, "" },
{ "B_Kitbag_cbr", "", 2, "" },
{ "B_Bergen_mcamo", "Bergen Rucksack", 2, "" },
{ "B_Carryall_cbr", "Grosser Rucksack", 2, "" }
};
};
Alles anzeigen
Die fn_playerSkins sieht so aus:
Spoiler anzeigen
Code
#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((FETCH_CONST(life_coplevel)) == 1 && uniform player isEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_uniform_1.jpg"];
};
if((FETCH_CONST(life_coplevel)) == 2 && uniform player isEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_uniform_2.jpg"];
};
if((FETCH_CONST(life_coplevel)) == 3 && uniform player isEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_uniform_3.jpg"];
};
if((FETCH_CONST(life_coplevel)) == 4 && uniform player isEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_uniform_4.jpg"];
};
if((FETCH_CONST(life_coplevel)) == 5 && uniform player isEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_uniform_5.jpg"];
};
if((FETCH_CONST(life_coplevel)) == 6 && uniform player isEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_uniform_6.jpg"];
};
if((FETCH_CONST(life_coplevel)) == 7 && uniform player isEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_uniform_7.jpg"];
};
};
case independent: {
if (uniform player isEqualTo "U_Rangemaster") then {
player setObjectTextureGlobal [0, "textures\medic_uniform.jpg"];
};
};
};
Alles anzeigen
und die fn_equipGear sieht so aus:
Spoiler anzeigen
Code
/*
fn_equipGear.sqf
Author: Keine Ahnung.. Bohemia Wiki+SQF? o.O
Edit: Nox, www.ragecore.de / www.native-gamer.net
*/
private["_path","_unit","_type"];
_unit = [_this,0] call BIS_fnc_param;
_type = [_this,1,"",[""]] call BIS_fnc_param;
//COP KLEIDUNG
if(playerSide == west) then {
switch(_type) do {
case "U_Rangemaster" : {
_path = "skins\cop_uniform.jpg";
_unit setObjectTextureGlobal [0,_path];
};
case "U_I_pilotCoveralls" : {
_path = "skins\USPD_Pilotenkleidung.paa";
_unit setObjectTextureGlobal [0,_path];
};
case "U_O_V_Soldier_Viper_hex_F" : {
_path = "skins\USPD_Einsatzkleidung.paa";
_unit setObjectTextureGlobal [0,_path];
};
case "U_IG_Guerrilla_6_1" : {
_path = "skins\gucci_red.jpg";
_unit setObjectTextureGlobal [0,_path];
};
case "U_B_Wetsuit" : {
_path = "skins\USPD_Navy.paa";
_unit setObjectTextureGlobal [0,_path];
};
};
if((backpack player) == "B_Bergen_mcamo") then {
//(unitBackpack _unit) setObjectTextureGlobal [0, "textures\cop\cop_backpack.paa"];
(unitBackpack player) setObjectTextureGlobal [0, ""]; //Macht Rucksäcke unsichtbar :)
};
if((backpack player) == "B_ViperHarness_blk_F") then {
//(unitBackpack _unit) setObjectTextureGlobal [0, "textures\cop\cop_backpack.paa"];
(unitBackpack player) setObjectTextureGlobal [0, "skins\bpV.paa"];
};
};
//MEDIC KLEIDUNG
if(playerSide == independent) then {
switch(_type) do {
case "U_C_WorkerCoveralls" : {
_path = "textures\medic\medic_uniform.paa";
_unit setObjectTextureGlobal [0,_path];
};
};
if((backpack player) == "B_Bergen_mcamo") then {
(unitBackpack _unit) setObjectTextureGlobal [0, "textures\medic\medic_backpack.paa"];
};
};
//ZIVILISTEN KLEIDUNG
if(playerSide == civilian) then {
switch(_type) do {
case "U_C_WorkerCoveralls" : {
_path = "textures\civ\adac_cloth.jpg";
_unit setObjectTextureGlobal [0,_path];
};
case "U_C_Poloshirt_blue" : {
_path = "textures\civ\rccloth.jpg";
_unit setObjectTextureGlobal [0,_path];
};
};
};
Alles anzeigen
Der Client log sieht dann so aus:
Spoiler anzeigen
Code
21:36:54 "----------------------------------------------------------------------------------------------------"
21:36:54 "--------------------------------- Starting Altis Life Client Init ----------------------------------"
21:36:54 "------------------------------------------ Version 5.0.0 -------------------------------------------"
21:36:54 "----------------------------------------------------------------------------------------------------"
21:36:54 "::Life Client:: Initialization Variables"
21:36:54 "::Life Client:: Variables initialized"
21:36:54 "::Life Client:: Setting up Eventhandlers"
21:36:54 "::Life Client:: Eventhandlers completed"
21:36:54 "::Life Client:: Setting up user actions"
21:36:54 "::Life Client:: User actions completed"
21:36:54 "::Life Client:: Waiting for server functions to transfer.."
21:36:54 "::Life Client:: Received server functions."
21:36:54 "::Life Client:: Waiting for the server to be ready.."
21:36:54 Mission id: ffbc9eba1f9c849aef232524d84d3e7c83977a38
21:36:55 Error in expression <sEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_unifo>
21:36:55 Error position: <setObjectTextureGlobal ["skins\cop_unifo>
21:36:55 Error 1 elements provided, 2 expected
21:36:55 File core\functions\fn_playerSkins.sqf [life_fnc_playerSkins], line 113
21:36:57 Error in expression <sEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_unifo>
21:36:57 Error position: <setObjectTextureGlobal ["skins\cop_unifo>
21:36:57 Error 1 elements provided, 2 expected
21:36:57 File core\functions\fn_playerSkins.sqf [life_fnc_playerSkins], line 113
21:36:58 "Past Settings Init"
21:36:58 "Executing client.fsm"
21:36:58 "Display 46 Found"
21:36:58 "----------------------------------------------------------------------------------------------------"
21:36:58 " End of Altis Life Client Init :: Total Execution Time 4.29639 seconds "
21:36:58 "----------------------------------------------------------------------------------------------------"
21:37:02 Ref to nonnetwork object 2366e39f580# 1781188: usertexture10m.p3d
21:37:02 Error in expression <sEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_unifo>
21:37:02 Error position: <setObjectTextureGlobal ["skins\cop_unifo>
21:37:02 Error 1 elements provided, 2 expected
21:37:02 File core\functions\fn_playerSkins.sqf [life_fnc_playerSkins], line 113
21:37:07 Ref to nonnetwork object 234b2f1d600# 1781197: usertexture10m.p3d
21:37:08 Error in expression <sEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_unifo>
21:37:08 Error position: <setObjectTextureGlobal ["skins\cop_unifo>
21:37:08 Error 1 elements provided, 2 expected
21:37:08 File core\functions\fn_playerSkins.sqf [life_fnc_playerSkins], line 113
21:37:09 Error in expression <sEqualTo "U_Rangemaster") then
{
player setObjectTextureGlobal ["skins\cop_unifo>
21:37:09 Error position: <setObjectTextureGlobal ["skins\cop_unifo>
21:37:09 Error 1 elements provided, 2 expected
21:37:09 File core\functions\fn_playerSkins.sqf [life_fnc_playerSkins], line 113
Alles anzeigen
Ich kann halt nix mit diesem Error anfangen, sagt mir nix...
Den Server log hänge ich natürlich an