Advertisement
Muzze77

[Arma 3] Place in Vehicle

Dec 16th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 14.95 KB | None | 0 0
  1.  
  2. _unit = (_this select 1);
  3. _car = (_this select 0);
  4. _dist = _unit distance _car;
  5. _carName = typeof _car;
  6.  
  7. //hint _carName;
  8. //copyToClipboard _carName;
  9.  
  10. //place Inside Vehicle / on Top
  11. FNC_MZ_PlaceInVehicle = {
  12. _unit = _this select 1;
  13. _car  = _this select 0;
  14. _carName = typeof _car;
  15.  
  16. _create = attachedObjects _unit;
  17.  
  18. switch (_carName) do
  19. {  
  20.     case "C_Van_02_transport_F":
  21.     {
  22.         _tunk = count attachedObjects _car;
  23.         {
  24.         switch (_tunk) do
  25.         {
  26.             case 0:
  27.             {
  28.                 detach _x;
  29.                 _x attachTo [_car, [-0.5,-1.55,-0.6]];
  30.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  31.                 _tunk = _tunk + 1;
  32.             };
  33.             case 1:
  34.             {
  35.                 detach _x;
  36.                 _x attachTo [_car, [+0.5,-1.55,-0.6]];
  37.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  38.                 _tunk = _tunk + 1;
  39.             };
  40.             case 2:
  41.             {
  42.                 detach _x;
  43.                 _x attachTo [_car, [-0.5,-1.55,0]];
  44.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  45.                 _tunk = _tunk + 1;
  46.             }; 
  47.             case 3:
  48.             {
  49.                 detach _x;
  50.                 _x attachTo [_car, [+0.5,-1.55,0]];
  51.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  52.                 _tunk = _tunk + 1;
  53.             };
  54.            
  55.             case 4:
  56.             {
  57.                 detach _x;
  58.                 _x attachTo [_car, [0,-2.65,-0.6]];
  59.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  60.                 _tunk = _tunk + 1;
  61.             };
  62.             case 5:
  63.             {
  64.                 detach _x;
  65.                 _x attachTo [_car, [0,-2.65,0]];
  66.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  67.                
  68.             };
  69.            
  70.             };
  71.         }foreach _create;
  72.     };
  73.    
  74.     case "C_Van_02_vehicle_F":
  75.     {
  76.         _tunk = count attachedObjects _car;
  77.         {
  78.         switch (_tunk) do
  79.         {
  80.             case 0:
  81.             {
  82.                 detach _x;
  83.                 _x attachTo [_car, [-0.5,-2.3,-0.6]];
  84.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  85.                 _tunk = _tunk + 1;
  86.             };
  87.             case 1:
  88.             {
  89.                 detach _x;
  90.                 _x attachTo [_car, [-0.5,-0.80,-0.6]];
  91.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  92.                 _tunk = _tunk + 1;
  93.             };
  94.             case 2:
  95.             {
  96.                 detach _x;
  97.                 _x attachTo [_car, [-0.5,0.7,-0.6]];
  98.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  99.                 _tunk = _tunk + 1;
  100.             }; 
  101.             case 3:
  102.             {
  103.                 detach _x;
  104.                 _x attachTo [_car, [0.5,-2.3,-0.6]];
  105.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  106.                 _tunk = _tunk + 1;
  107.             };
  108.             case 4:
  109.             {
  110.                 detach _x;
  111.                 _x attachTo [_car, [0.5,-0.80,-0.6]];
  112.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  113.                 _tunk = _tunk + 1;
  114.             };
  115.             case 5:
  116.             {
  117.                 detach _x;
  118.                 _x attachTo [_car, [0.5,0.7,-0.6]];
  119.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  120.                 _tunk = _tunk + 1;
  121.             };
  122.             case 6:
  123.             {
  124.                 detach _x;
  125.                 _x attachTo [_car, [-0.5,-2.3,0.05]];
  126.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  127.                 _tunk = _tunk + 1;
  128.             };
  129.             case 7:
  130.             {
  131.                 detach _x;
  132.                 _x attachTo [_car, [-0.5,-0.80,0.05]];
  133.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  134.                 _tunk = _tunk + 1;
  135.             };
  136.             case 8:
  137.             {
  138.                 detach _x;
  139.                 _x attachTo [_car, [-0.5,0.7,0.05]];
  140.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  141.                 _tunk = _tunk + 1;
  142.             }; 
  143.             case 9:
  144.             {
  145.                 detach _x;
  146.                 _x attachTo [_car, [0.5,-2.3,0.05]];
  147.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  148.                 _tunk = _tunk + 1;
  149.             };
  150.             case 10:
  151.             {
  152.                 detach _x;
  153.                 _x attachTo [_car, [0.5,-0.80,0.05]];
  154.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  155.                 _tunk = _tunk + 1;
  156.             };
  157.             case 11:
  158.             {
  159.                 detach _x;
  160.                 _x attachTo [_car, [0.5,0.7,0.05]];
  161.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  162.                
  163.             }; 
  164.  
  165.         };
  166.         }foreach _create;
  167.     };
  168.    
  169.     case "C_Offroad_01_F":
  170.     {
  171.         _tunk = count attachedObjects _car;
  172.         {
  173.         switch (_tunk) do
  174.         {
  175.             case 0:
  176.             {
  177.                 detach _x;
  178.                 _x attachTo [_car, [0,-1,-0.3]];
  179.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  180.                 _tunk = _tunk + 1;
  181.             };
  182.             case 1:
  183.             {
  184.                 detach _x;
  185.                 _x attachTo [_car, [0,-1,0.35]];
  186.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  187.                 _tunk = _tunk + 1;
  188.             };
  189.             case 2:
  190.             {
  191.                 detach _x;
  192.                 _x attachTo [_car, [0,-1.9,-0.3]];
  193.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  194.                 _tunk = _tunk + 1;
  195.             }; 
  196.             case 3:
  197.             {
  198.                 detach _x;
  199.                 _x attachTo [_car, [0,-1.9,0.35]];
  200.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  201.             };
  202.         };
  203.         }foreach _create;
  204.     };
  205.  
  206.     case "B_Heli_Transport_03_unarmed_F":
  207.     {
  208.        
  209.         _tunk = count attachedObjects _car;
  210.         {
  211.         switch (_tunk) do
  212.         {
  213.             case 0:
  214.             {
  215.                 detach _x;
  216.                 _x attachTo [_car, [0,1.9,-1.9]];
  217.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  218.                 _tunk = _tunk + 1;
  219.             };
  220.             case 1:
  221.             {
  222.                 detach _x;
  223.                 _x attachTo [_car, [0,1.0,-1.9]];
  224.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  225.                 _tunk = _tunk + 1;
  226.             };
  227.             case 2:
  228.             {
  229.                 detach _x;
  230.                 _x attachTo [_car, [0,0.1,-1.9]];
  231.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  232.                 _tunk = _tunk + 1;
  233.             }; 
  234.             case 3:
  235.             {
  236.                 detach _x;
  237.                 _x attachTo [_car, [0,-0.8,-1.9]];
  238.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  239.                 _tunk = _tunk + 1;
  240.             };
  241.             case 4:
  242.             {
  243.                 detach _x;
  244.                 _x attachTo [_car, [0,-1.7,-1.9]];
  245.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  246.                 _tunk = _tunk + 1;
  247.             };
  248.             case 5:
  249.             {
  250.                 detach _x;
  251.                 _x attachTo [_car, [0,-2.6,-1.9]];
  252.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  253.                 _tunk = _tunk + 1;
  254.             };
  255.             case 6:
  256.             {
  257.                 detach _x;
  258.                 _x attachTo [_car, [0,1.9,-1.25]];
  259.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  260.                 _tunk = _tunk + 1;
  261.             };
  262.             case 7:
  263.             {
  264.                 detach _x;
  265.                 _x attachTo [_car, [0,1.0,-1.25]];
  266.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  267.                 _tunk = _tunk + 1;
  268.             };
  269.             case 8:
  270.             {
  271.                 detach _x;
  272.                 _x attachTo [_car, [0,0.1,-1.25]];
  273.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  274.                 _tunk = _tunk + 1;
  275.             }; 
  276.             case 9:
  277.             {
  278.                 detach _x;
  279.                 _x attachTo [_car, [0,-0.8,-1.25]];
  280.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  281.                 _tunk = _tunk + 1;
  282.             };
  283.             case 10:
  284.             {
  285.                 detach _x;
  286.                 _x attachTo [_car, [0,-1.7,-1.25]];
  287.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  288.                 _tunk = _tunk + 1;
  289.             };
  290.             case 11:
  291.             {
  292.                 detach _x;
  293.                 _x attachTo [_car, [0,-2.6,-1.25]];
  294.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  295.                 _tunk = _tunk + 1;
  296.             }; 
  297.             case 12:
  298.             {
  299.                 detach _x;
  300.                 _x attachTo [_car, [0,1.9,-0.6]];
  301.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  302.                 _tunk = _tunk + 1;
  303.             };
  304.             case 13:
  305.             {
  306.                 detach _x;
  307.                 _x attachTo [_car, [0,1.0,-0.6]];
  308.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  309.                 _tunk = _tunk + 1;
  310.             };
  311.             case 14:
  312.             {
  313.                 detach _x;
  314.                 _x attachTo [_car, [0,0.1,-0.6]];
  315.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  316.                 _tunk = _tunk + 1;
  317.             }; 
  318.             case 15:
  319.             {
  320.                 detach _x;
  321.                 _x attachTo [_car, [0,-0.8,-0.6]];
  322.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  323.                 _tunk = _tunk + 1;
  324.             };
  325.             case 16:
  326.             {
  327.                 detach _x;
  328.                 _x attachTo [_car, [0,-1.7,-0.6]];
  329.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  330.                 _tunk = _tunk + 1;
  331.             };
  332.             case 17:
  333.             {
  334.                 detach _x;
  335.                 _x attachTo [_car, [0,-2.6,-0.6]];
  336.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  337.                 _tunk = _tunk + 1;
  338.             };
  339.        
  340.         };
  341.     }foreach _create;
  342.     };
  343.  
  344.     case "B_UGV_01_F":
  345.     {
  346.         _tunk = count attachedObjects _car;
  347.         {
  348.         switch (_tunk) do
  349.         {
  350.        
  351.             case 0:
  352.             {
  353.                 detach _x;
  354.                 _x attachTo [_car, [+0.5,-0.1,-0.35]];
  355.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  356.                 _tunk = _tunk + 1;
  357.            
  358.             };
  359.             case 1:
  360.             {
  361.                 detach _x;
  362.                 _x attachTo [_car, [+0.5,-0.1,0.30]];
  363.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  364.                 _tunk = _tunk + 1;
  365.             };
  366.             case 2:
  367.             {
  368.                 detach _x;
  369.                 _x attachTo [_car, [+0.5,-1,-0.35]];
  370.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  371.                 _tunk = _tunk + 1;
  372.             };
  373.             case 3:
  374.             {
  375.                 detach _x;
  376.                 _x attachTo [_car, [+0.5,-1,0.30]];
  377.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  378.                 _tunk = _tunk + 1;
  379.             };
  380.             case 4:
  381.             {
  382.                 detach _x;
  383.                 _x attachTo [_car, [+0.5,-1.9,-0.35]];
  384.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  385.                 _tunk = _tunk + 1;
  386.             }; 
  387.             case 5:
  388.             {
  389.                 detach _x;
  390.                 _x attachTo [_car, [+0.5,-1.9,0.30]];
  391.                 _x setVectorDirAndUp [[(vectorDir _car select 0) + sin 90,0,0],[0,0,1]];
  392.             };
  393.         };
  394.     }foreach _create;
  395.     };
  396.    
  397.     case "O_MRAP_02_F":
  398.     {
  399.         _tunk = count attachedObjects _car;
  400.         {
  401.         switch (_tunk) do
  402.         {
  403.             case 0:
  404.             {
  405.                 detach _x;
  406.                 _x attachTo [_car, [-0.76,-3.5,-0.3]];
  407.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  408.                 _tunk = _tunk + 1;
  409.             };
  410.             case 1:
  411.             {
  412.                 detach _x;
  413.                 _x attachTo [_car, [0,-3.5,-0.3]];
  414.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  415.                 _tunk = _tunk + 1;
  416.             };
  417.             case 2:
  418.             {
  419.                 detach _x;
  420.                 _x attachTo [_car, [+0.76,-3.5,-0.3]];
  421.                 _x setVectorDirAndUp [[0,0,0],[0,0,1]];
  422.  
  423.             }; 
  424.         };
  425.         }foreach _create;
  426.     };
  427.    
  428.    
  429. }; //switch
  430.  
  431. }; //function
  432.  
  433.  
  434. //Check Vehicle
  435. switch (_carName) do
  436. {
  437.     //Van Transport
  438.     case "C_Van_02_vehicle_F":
  439.     {
  440.         if (_dist > 5) then
  441.         {
  442.             hint "Kein Fahrzeg in der Naehe";
  443.         }
  444.         else
  445.         {
  446.             if (count attachedObjects _car >= 12) then
  447.             {
  448.                 hint "Nicht genug platz im Fahrzeug [12/12]";
  449.             }
  450.             else
  451.             {
  452.                 _doorState = _car doorPhase "door_4_source";
  453.                 if (_doorState == 1) then
  454.                     {
  455.                         _handle = false;
  456.                         _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
  457.  
  458.                         removeallactions _unit;
  459.                         removeallactions _car;
  460.                         _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  461.                         _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];   
  462.                         if (_doorState == 1) then
  463.                         {
  464.                             _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  465.                         }
  466.                         else
  467.                         {  
  468.                             _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  469.                         };
  470.                     }
  471.                 else
  472.                 {
  473.                         hint "Fahrzeugtuer ist geschlossen";
  474.                 };
  475.             };
  476.                
  477.    
  478.         };
  479.     };
  480.    
  481.    
  482.     //Van Group
  483.     case "C_Van_02_transport_F":
  484.     {
  485.         if (_dist > 5) then
  486.         {
  487.             hint "Kein Fahrzeg in der Naehe";
  488.         }
  489.         else
  490.         {
  491.             if (count attachedObjects _car > 6) then
  492.             {
  493.                 hint "Nicht genug platz im Fahrzeug [6/6]";
  494.             }
  495.             else
  496.             {
  497.                 _doorState = _car doorPhase "door_4_source";
  498.                 if (_doorState == 1) then
  499.                 {
  500.                     _handle = false;
  501.                     _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
  502.                    
  503.                     removeallactions _unit;
  504.                     removeallactions _car;
  505.                     _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  506.                     _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];   
  507.                     if (_doorState == 1) then
  508.                     {
  509.                         _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  510.                     }
  511.                     else
  512.                     {  
  513.                         _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  514.                     };
  515.                 }
  516.                 else
  517.                 {
  518.                     hint "Fahrzeugtuer ist geschlossen";
  519.                 };
  520.             };
  521.            
  522.         };
  523.     };
  524.    
  525.    
  526.  
  527.     //Offroad UNARMED
  528.     case "C_Offroad_01_F":
  529.     {
  530.         if (_dist > 5) then
  531.         {
  532.             hint "Kein Fahrzeg in der Naehe";
  533.         }
  534.         else
  535.         {
  536.             if (count attachedObjects _car >= 4) then
  537.             {
  538.                 hint "Nicht genug platz im Fahrzeug [4/4]";
  539.             }
  540.             else
  541.             {
  542.                 _doorState = _car animationPhase "HideDoor3";
  543.                 if (_doorState == 1) then
  544.                 {
  545.                     _handle = false;
  546.                     _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
  547.                     removeallactions _unit;
  548.                     removeallactions _car;
  549.                     _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  550.                     _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];   
  551.                     if (_doorState == 1) then
  552.                     {
  553.                         _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",4];
  554.                     }
  555.                     else
  556.                     {  
  557.                         _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",4];
  558.                     };
  559.                 }
  560.                 else
  561.                 {
  562.                 hint "Fahrzeugtuer ist geschlossen";
  563.                 };  
  564.  
  565.             };
  566.        
  567.         };
  568.     };
  569.  
  570.    
  571.     //HURON UNARMED
  572.     case "B_Heli_Transport_03_unarmed_F":
  573.     {
  574.         if (_dist > 10) then
  575.         {
  576.             hint "Kein Fahrzeg in der Naehe";
  577.         }
  578.         else
  579.         {
  580.             if (count attachedObjects _car >= 18) then
  581.             {
  582.                 hint "Nicht genug platz im Fahrzeug [18/18]";
  583.             }
  584.             else
  585.             {
  586.                 _doorState = _car doorPhase "Door_rear_source";
  587.                 if (_doorState == 1) then
  588.                 {
  589.                 _handle = false;
  590.                 _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
  591.                 removeallactions _unit;
  592.                 removeallactions _car;
  593.                 _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  594.                 _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",10];  
  595.                     if (_doorState == 1) then
  596.                     {
  597.                         _car addAction ["Kofferraum schliesen","openTunk.sqf"];
  598.                     }
  599.                     else
  600.                     {  
  601.                         _car addAction ["Kofferraum oeffnen","openTunk.sqf"];
  602.                     };
  603.                 };
  604.             };
  605.        
  606.         };
  607.     };
  608.  
  609.  
  610.     //Stomper NATO
  611.     case "B_UGV_01_F":
  612.     {
  613.         if (_dist > 5) then
  614.         {
  615.             hint "Kein Fahrzeg in der Naehe";
  616.         }
  617.         else
  618.         {
  619.             if (count attachedObjects _car >= 6) then
  620.             {
  621.                 hint "Nicht genug platz im Fahrzeug [6/6]";
  622.             }
  623.             else
  624.             {
  625.                 _handle = false;
  626.                 _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;    
  627.                 removeallactions _unit;
  628.                 removeallactions _car;
  629.                 _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  630.                 _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];
  631.             };
  632.         };
  633.     };
  634.  
  635.  
  636.     //Ifrit
  637.     case "O_MRAP_02_F":
  638.     {
  639.         if (_dist > 6) then
  640.         {
  641.             hint "Kein Fahrzeg in der Naehe";
  642.         }
  643.         else
  644.         {
  645.             if (count attachedObjects _car >= 3) then
  646.             {
  647.                 hint "Nicht genug platz im Fahrzeug [3/3]";
  648.             }
  649.             else
  650.             {
  651.                 _doorState = _car animationPhase "Door_rear";
  652.                 if (_doorState == 1) then
  653.                 {
  654.                     _handle = false;
  655.                     _handle = [[_car,_unit],"FNC_MZ_PlaceInVehicle",true,true] call BIS_fnc_MP;
  656.                     removeallactions _unit;
  657.                     removeallactions _car;
  658.                     _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  659.                     _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",6];   
  660.                     if (_doorState == 1) then
  661.                     {
  662.                         _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",6];
  663.                     }
  664.                     else
  665.                     {  
  666.                         _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",6];
  667.                     };
  668.                 }
  669.                 else
  670.                 {
  671.                 hint "Fahrzeugtuer ist geschlossen";
  672.                 };  
  673.  
  674.             };
  675.        
  676.         };
  677.     };
  678. }; //switch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement