moin moin
ich malwieder ich habe das
Tutorial Öl nur in Tank Fahrzeuge lagern gemacht
funzt ganz super jetzt wollte ich das
Script ein 2 mal verwenden und mußte fest stellen das ich
warscheinli ein bisschen zu doof dafür bin habe es so
gemacht hir mal mein Code:
Code
core\configuration.sqf
unter Backend Variables
life_TankLaster = 1;
life_UranLaster = 1;
fn_vehStoreItem.sqf und fn_vehStoreAllItem.sqf eingefügt
private["_ctrl","_num","_totalWeight","_itemWeight","_veh_data","_inv","_index","_val","_Truck","_FuelTrucks","_FuelStuff","_Truck1","_UranFuel","_UranStuff"];
// Oil
_Truck = TypeOf life_trunk_vehicle;
_FuelStuff = ["oilUnprocessed","oilProcessed","oil_unprocessed","oil_processed","benzin","diesel","kerosin"]; //Wich Items can be stored in?
_FuelTrucks = ["C_Van_01_fuel_F","I_Truck_02_fuel_F","O_Truck_03_fuel_F","B_Truck_01_fuel_F"]; //Fuel Trucks, who are allowed to carry fuel
switch (true) do
{
case ((_ctrl in _FuelStuff) && (_Truck in _FuelTrucks)): {life_TankLaster = 1}; //Fuel in FuelTruck -> Allowed
case (!(_ctrl in _FuelStuff) && !(_Truck in _FuelTrucks)): {life_TankLaster = 2}; //NonFuel in NonFuelTruck -> Allowed
case (!(_ctrl in _FuelStuff) && (_Truck in _FuelTrucks)): {life_TankLaster = 3}; //NonFuel in FuelTruck -> Nope
case ((_ctrl in _FuelStuff) && !(_Truck in _FuelTrucks)): {life_TankLaster = 4}; //Fuel in NonFuelTruck -> Nope!
};
if (life_TankLaster isEqualTo 3) exitWith {hint "Du kannst nur Öl, Benzin, Diesel oder Kerosin in einen Tanklaster füllen!)"};
if (life_TankLaster isEqualTo 4) exitWith {hint "Du kannst Öl, Benzin, Diesel oder Kerosin NUR in einen Tanklaster füllen!)";};
// Uran
_Truck1 = TypeOf life_trunk_vehicle;
_UranStuff = ["uran_cut","uran_cut1"]; //Wich Items can be stored in?
_UranFuel = ["I_Truck_02_box_F","O_Truck_03_repair_F"]; //Fuel Trucks, who are allowed to carry fuel
switch (true) do
{
case ((_ctrl in _UranStuff) && (_Truck1 in _UranFuel)): {life_UranLaster = 1}; //Fuel in FuelTruck -> Allowed
case (!(_ctrl in _UranStuff) && !(_Truck1 in _UranFuel)): {life_UranLaster = 2}; //NonFuel in NonFuelTruck -> Allowed
case (!(_ctrl in _UranStuff) && (_Truck1 in _UranFuel)): {life_UranLaster = 3}; //NonFuel in FuelTruck -> Nope
case ((_ctrl in _UranStuff) && !(_Truck1 in _UranFuel)): {life_UranLaster = 4}; //Fuel in NonFuelTruck -> Nope!
};
if (life_UranLaster isEqualTo 3) exitWith {hint "Du kannst nur Uranerz oder Brennstäbe nur in einem Castor füllen!)"};
if (life_UranLaster isEqualTo 4) exitWith {hint "Du kannst nur Uranerz oder Brennstäbe nur in einem Castor füllen!)";};
Alles anzeigen
Öl funzt nur das andere nich
hoffe das mir jemand helfen kann
ich Danke euch
PS.: keine fehler in den Log Datein