Skip to content

Commit

Permalink
Fixed faction system not implemented in cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom committed Aug 9, 2022
1 parent d065eb0 commit 46571eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cScripts/functions/vehicle/fn_vehicle_addCosmetics.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ params [["_vehicle", objNull, [objNull]]];
if (!isServer) exitWith {};
if (_vehicle iskindOf "man") exitWith {};
if (!isNil {_vehicle getVariable QEGVAR(Vehicle,Cosmetics);}) exitWith {[formatText["Vehicle cosmetics already applied for %1.", _vehicle]] call FUNC(warning);};
if (!(faction _vehicle in ["BLU_F", "BLU_CTRG_F", "BLU_T_F", "BLU_USA_7CAV_F", "rhs_faction_usaf", "rhs_faction_usarmy", "rhs_faction_usarmy_d", "rhs_faction_usarmy_wd", "rhs_faction_usmc", "rhs_faction_usmc_d", "rhs_faction_usmc_wd", "rhs_faction_usn"]));

// Is valid vehicle
private _factionArray = parseSimpleArray EGVAR(Settings,vehicleFactions);
if !(_factionArray isEqualType []) exitWith {["Faction array have not been setup correctly.", "Vehicle"] call FUNC(error);};
if (!(faction _vehicle in _factionArray)) exitWith {};


private _vehicleType = _vehicle getVariable [QEGVAR(Vehicle,Type), typeOf _vehicle];

Expand Down

0 comments on commit 46571eb

Please sign in to comment.