Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _unit = (_this select 1);
- _car = (_this select 0);
- _dist = _unit distance _car;
- _carName = typeof _car;
- //hint _carName;
- //copyToClipboard _carName;
- //place Inside Vehicle / on Top
- FNC_MZ_PlaceInVehicle = {
- _unit = _this select 1;
- _car = _this select 0;
- _carName = typeof _car;
- _create = attachedObjects _unit;
- switch (_carName) do
- {
- case "C_Van_02_transport_F":
- {
- _tunk = count attachedObjects _car;
- {
- switch (_tunk) do
- {
- case 0:
- {
- detach _x;
- _x attachTo [_car, [-0.5,-1.55,-0.6]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 1:
- {
- detach _x;
- _x attachTo [_car, [+0.5,-1.55,-0.6]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 2:
- {
- detach _x;
- _x attachTo [_car, [-0.5,-1.55,0]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 3:
- {
- detach _x;
- _x attachTo [_car, [+0.5,-1.55,0]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 4:
- {
- detach _x;
- _x attachTo [_car, [0,-2.65,-0.6]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 5:
- {
- detach _x;
- _x attachTo [_car, [0,-2.65,0]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- };
- };
- }foreach _create;
- };
- case "C_Van_02_vehicle_F":
- {
- _tunk = count attachedObjects _car;
- {
- switch (_tunk) do
- {
- case 0:
- {
- detach _x;
- _x attachTo [_car, [-0.5,-2.3,-0.6]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 1:
- {
- detach _x;
- _x attachTo [_car, [-0.5,-0.80,-0.6]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 2:
- {
- detach _x;
- _x attachTo [_car, [-0.5,0.7,-0.6]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 3:
- {
- detach _x;
- _x attachTo [_car, [0.5,-2.3,-0.6]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 4:
- {
- detach _x;
- _x attachTo [_car, [0.5,-0.80,-0.6]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 5:
- {
- detach _x;
- _x attachTo [_car, [0.5,0.7,-0.6]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 6:
- {
- detach _x;
- _x attachTo [_car, [-0.5,-2.3,0.05]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 7:
- {
- detach _x;
- _x attachTo [_car, [-0.5,-0.80,0.05]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 8:
- {
- detach _x;
- _x attachTo [_car, [-0.5,0.7,0.05]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 9:
- {
- detach _x;
- _x attachTo [_car, [0.5,-2.3,0.05]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 10:
- {
- detach _x;
- _x attachTo [_car, [0.5,-0.80,0.05]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 11:
- {
- detach _x;
- _x attachTo [_car, [0.5,0.7,0.05]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- };
- };
- }foreach _create;
- };
- case "C_Offroad_01_F":
- {
- _tunk = count attachedObjects _car;
- {
- switch (_tunk) do
- {
- case 0:
- {
- detach _x;
- _x attachTo [_car, [0,-1,-0.3]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 1:
- {
- detach _x;
- _x attachTo [_car, [0,-1,0.35]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 2:
- {
- detach _x;
- _x attachTo [_car, [0,-1.9,-0.3]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 3:
- {
- detach _x;
- _x attachTo [_car, [0,-1.9,0.35]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- };
- };
- }foreach _create;
- };
- case "B_Heli_Transport_03_unarmed_F":
- {
- _tunk = count attachedObjects _car;
- {
- switch (_tunk) do
- {
- case 0:
- {
- detach _x;
- _x attachTo [_car, [0,1.9,-1.9]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 1:
- {
- detach _x;
- _x attachTo [_car, [0,1.0,-1.9]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 2:
- {
- detach _x;
- _x attachTo [_car, [0,0.1,-1.9]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 3:
- {
- detach _x;
- _x attachTo [_car, [0,-0.8,-1.9]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 4:
- {
- detach _x;
- _x attachTo [_car, [0,-1.7,-1.9]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 5:
- {
- detach _x;
- _x attachTo [_car, [0,-2.6,-1.9]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 6:
- {
- detach _x;
- _x attachTo [_car, [0,1.9,-1.25]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 7:
- {
- detach _x;
- _x attachTo [_car, [0,1.0,-1.25]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 8:
- {
- detach _x;
- _x attachTo [_car, [0,0.1,-1.25]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 9:
- {
- detach _x;
- _x attachTo [_car, [0,-0.8,-1.25]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 10:
- {
- detach _x;
- _x attachTo [_car, [0,-1.7,-1.25]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 11:
- {
- detach _x;
- _x attachTo [_car, [0,-2.6,-1.25]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 12:
- {
- detach _x;
- _x attachTo [_car, [0,1.9,-0.6]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 13:
- {
- detach _x;
- _x attachTo [_car, [0,1.0,-0.6]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 14:
- {
- detach _x;
- _x attachTo [_car, [0,0.1,-0.6]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 15:
- {
- detach _x;
- _x attachTo [_car, [0,-0.8,-0.6]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 16:
- {
- detach _x;
- _x attachTo [_car, [0,-1.7,-0.6]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 17:
- {
- detach _x;
- _x attachTo [_car, [0,-2.6,-0.6]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- };
- }foreach _create;
- };
- case "B_UGV_01_F":
- {
- _tunk = count attachedObjects _car;
- {
- switch (_tunk) do
- {
- case 0:
- {
- detach _x;
- _x attachTo [_car, [+0.5,-0.1,-0.35]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 1:
- {
- detach _x;
- _x attachTo [_car, [+0.5,-0.1,0.30]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 2:
- {
- detach _x;
- _x attachTo [_car, [+0.5,-1,-0.35]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 3:
- {
- detach _x;
- _x attachTo [_car, [+0.5,-1,0.30]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 4:
- {
- detach _x;
- _x attachTo [_car, [+0.5,-1.9,-0.35]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 5:
- {
- detach _x;
- _x attachTo [_car, [+0.5,-1.9,0.30]];
- _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
- };
- };
- }foreach _create;
- };
- case "O_MRAP_02_F":
- {
- _tunk = count attachedObjects _car;
- {
- switch (_tunk) do
- {
- case 0:
- {
- detach _x;
- _x attachTo [_car, [-0.76,-3.5,-0.3]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 1:
- {
- detach _x;
- _x attachTo [_car, [0,-3.5,-0.3]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- _tunk = _tunk + 1;
- };
- case 2:
- {
- detach _x;
- _x attachTo [_car, [+0.76,-3.5,-0.3]];
- _x setVectorDirAndUp [[0,0,0],[0,0,1]];
- };
- };
- }foreach _create;
- };
- }; //switch
- }; //function
- //Check Vehicle
- switch (_carName) do
- {
- //Van Transport
- case "C_Van_02_vehicle_F":
- {
- if (_dist > 5) then
- {
- hint "Kein Fahrzeg in der Naehe";
- }
- else
- {
- if (count attachedObjects _car >= 12) then
- {
- hint "Nicht genug platz im Fahrzeug [12/12]";
- }
- else
- {
- _doorState = _car doorPhase "door_4_source";
- if (_doorState == 1) then
- {
- _handle = false;
- _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
- removeallactions _unit;
- removeallactions _car;
- _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
- _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];
- if (_doorState == 1) then
- {
- _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",5];
- }
- else
- {
- _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",5];
- };
- }
- else
- {
- hint "Fahrzeugtuer ist geschlossen";
- };
- };
- };
- };
- //Van Group
- case "C_Van_02_transport_F":
- {
- if (_dist > 5) then
- {
- hint "Kein Fahrzeg in der Naehe";
- }
- else
- {
- if (count attachedObjects _car > 6) then
- {
- hint "Nicht genug platz im Fahrzeug [6/6]";
- }
- else
- {
- _doorState = _car doorPhase "door_4_source";
- if (_doorState == 1) then
- {
- _handle = false;
- _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
- removeallactions _unit;
- removeallactions _car;
- _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
- _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];
- if (_doorState == 1) then
- {
- _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",5];
- }
- else
- {
- _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",5];
- };
- }
- else
- {
- hint "Fahrzeugtuer ist geschlossen";
- };
- };
- };
- };
- //Offroad UNARMED
- case "C_Offroad_01_F":
- {
- if (_dist > 5) then
- {
- hint "Kein Fahrzeg in der Naehe";
- }
- else
- {
- if (count attachedObjects _car >= 4) then
- {
- hint "Nicht genug platz im Fahrzeug [4/4]";
- }
- else
- {
- _doorState = _car animationPhase "HideDoor3";
- if (_doorState == 1) then
- {
- _handle = false;
- _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
- removeallactions _unit;
- removeallactions _car;
- _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
- _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];
- if (_doorState == 1) then
- {
- _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",4];
- }
- else
- {
- _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",4];
- };
- }
- else
- {
- hint "Fahrzeugtuer ist geschlossen";
- };
- };
- };
- };
- //HURON UNARMED
- case "B_Heli_Transport_03_unarmed_F":
- {
- if (_dist > 10) then
- {
- hint "Kein Fahrzeg in der Naehe";
- }
- else
- {
- if (count attachedObjects _car >= 18) then
- {
- hint "Nicht genug platz im Fahrzeug [18/18]";
- }
- else
- {
- _doorState = _car doorPhase "Door_rear_source";
- if (_doorState == 1) then
- {
- _handle = false;
- _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
- removeallactions _unit;
- removeallactions _car;
- _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
- _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",10];
- if (_doorState == 1) then
- {
- _car addAction ["Kofferraum schliesen","openTunk.sqf"];
- }
- else
- {
- _car addAction ["Kofferraum oeffnen","openTunk.sqf"];
- };
- };
- };
- };
- };
- //Stomper NATO
- case "B_UGV_01_F":
- {
- if (_dist > 5) then
- {
- hint "Kein Fahrzeg in der Naehe";
- }
- else
- {
- if (count attachedObjects _car >= 6) then
- {
- hint "Nicht genug platz im Fahrzeug [6/6]";
- }
- else
- {
- _handle = false;
- _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
- removeallactions _unit;
- removeallactions _car;
- _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
- _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];
- };
- };
- };
- //Ifrit
- case "O_MRAP_02_F":
- {
- if (_dist > 6) then
- {
- hint "Kein Fahrzeg in der Naehe";
- }
- else
- {
- if (count attachedObjects _car >= 3) then
- {
- hint "Nicht genug platz im Fahrzeug [3/3]";
- }
- else
- {
- _doorState = _car animationPhase "Door_rear";
- if (_doorState == 1) then
- {
- _handle = false;
- _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
- removeallactions _unit;
- removeallactions _car;
- _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
- _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",6];
- if (_doorState == 1) then
- {
- _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",6];
- }
- else
- {
- _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",6];
- };
- }
- else
- {
- hint "Fahrzeugtuer ist geschlossen";
- };
- };
- };
- };
- }; //switch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement