Hey Leute, falls dies hier im falschen Bereich ist entschuldige ich mich dafür.
Auf jedenfall bin ich ja momentan dabei einen AL Server zu scripten und der Spawnt mich als Cop immer komplett ohne copLoadout.
Aber erst seitdem ich probiert habe ein classname mit mehreren Skins zu versehen(Anders je nach Rang).
fn_initCop.sqf
#include "..\script_macros.hpp"
private "_end";
player addRating 9999999;
waitUntil {!(isNull (findDisplay 46))};
_end = false;
if (life_blacklisted) exitWith {
["Blacklisted",false,true] call BIS_fnc_endMission;
sleep 30;
};
/*if (!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then {
if ((FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then {
["NotWhitelisted",false,true] call BIS_fnc_endMission;
sleep 35;
};
};*/
if((FETCH_CONST(life_coplevel)) isEqualTo 0) exitWith {
["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.
[] spawn life_fnc_placeablesInit;
fn_copLoadout
private["_handle"];
_handle = [] spawn life_fnc_stripDownPlayer;
waitUntil {scriptDone _handle};
//Load player with default cop gear.
//if (FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0) exitWith { hint "Du bist kein Polizeibeamter!" };
if (FETCH_CONST(life_coplevel) >= 1) then {
player addUniform "U_Rangemaster";
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";
/* ITEMS */
player addItem "ItemMap";
player assignItem "ItemMap";
player addItem "ItemCompass";
player assignItem "ItemCompass";
player addItem "ItemWatch";
player assignItem "ItemWatch";
player addItem "ItemGPS";
player assignItem "ItemGPS";
} else if (FETCH_CONST(life_coplevel) >= 4) then {
player addUniform "U_B_CombatUniform_mcam_vest";
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";
/* ITEMS */
player addItem "ItemMap";
player assignItem "ItemMap";
player addItem "ItemCompass";
player assignItem "ItemCompass";
player addItem "ItemWatch";
player assignItem "ItemWatch";
player addItem "ItemGPS";
player assignItem "ItemGPS";
};
[] call life_fnc_playerSkins;
[] call life_fnc_saveGear;
fn_playerSkins(Wenn auch Fehler drinne?)
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\cop_uniform_private.jpg";
if (LIFE_SETTINGS(getNumber,"cop_extendedSkins") isEqualTo 1) then {
if (FETCH_CONST(life_coplevel) >= 1) then {
_skinName = ["textures\cop_uniform_",(FETCH_CONST(life_coplevel)),".jpg"] joinString "";
};
};
player setObjectTextureGlobal [0, _skinName];
};
};
*/
case west: {
if (uniform player isEqualTo "U_Rangemaster") then {
if (FETCH_CONST(life_coplevel) isEqualTo 1) then {
player setObjectTextureGlobal [0, "textures\cop_uniform_private.jpg"];
};
if (FETCH_CONST(life_coplevel) isEqualTo 2) then {
player setObjectTextureGlobal [0, "textures\cop_uniform_corporal.jpg"];
};
if (FETCH_CONST(life_coplevel) isEqualTo 3) then {
player setObjectTextureGlobal [0, "textures\cop_uniform_sergeant.jpg"];
};
} else if (uniform player isEqualTo "U_B_CombatUniform_mcam_vest") then {
if (FETCH_CONST(life_coplevel) isEqualTo 4) then {
player setObjectTextureGlobal [0, "textures\cop_uniform_lieutenant.jpg"];
};
if (FETCH_CONST(life_coplevel) isEqualTo 5) then {
player setObjectTextureGlobal [0, "textures\cop_uniform_captain.jpg"];
};
if (FETCH_CONST(life_coplevel) isEqualTo 6) then {
player setObjectTextureGlobal [0, "textures\cop_uniform_colonel.jpg"];
};
if (FETCH_CONST(life_coplevel) isEqualTo 7) then {
player setObjectTextureGlobal [0, "textures\cop_uniform_general.jpg"];
};
};
};
case independent: {
if (uniform player isEqualTo "U_Rangemaster") then {
player setObjectTextureGlobal [0, "textures\medic_uniform.jpg"];
};
};
};
ich würde mich über Hilfe sehr freuen.