Advertisement
Muzze77

[Arma 3] Open Trunk

Dec 16th, 2017
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 3.59 KB | None | 0 0
  1. _car = _this select 0;
  2.  
  3. _carName = typeOf _car ;
  4. //hint _carName;
  5. switch (_carName) do
  6. {
  7.     case "C_Van_02_vehicle_F":
  8.     {
  9.         _doorState = _car doorPhase "door_4_source";
  10.         if (_doorState == 1) then
  11.         {
  12.             _car animateDoor ["door_4_source",0,false];
  13.         }
  14.         else
  15.         {
  16.             _car animateDoor ["door_4_source",1,false];
  17.  
  18.         };
  19.         removeallActions _car;
  20.         _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];
  21.         if (_doorState == 1) then
  22.         {
  23.             _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  24.         }
  25.         else
  26.         {
  27.             _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  28.         };
  29.         if (count attachedObjects _car > 0) then
  30.         {
  31.             _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  32.         };
  33.     };
  34.  
  35.     case "C_Offroad_01_F":
  36.     {
  37.         _doorState = _car animationPhase "HideDoor3";
  38.         if (_doorState == 1) then
  39.         {
  40.             _car animate ["HideDoor3",0];
  41.         }
  42.         else
  43.         {
  44.             _car animate ["HideDoor3",1];
  45.         };
  46.         removeallActions _car;
  47.         _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];
  48.         if (_doorState == 1) then
  49.         {
  50.             _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  51.         }
  52.         else
  53.         {
  54.             _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  55.         };
  56.         if (count attachedObjects _car > 0) then
  57.         {
  58.         _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  59.         };
  60.     };
  61.  
  62.     case "C_Van_02_transport_F":
  63.     {
  64.         _doorState = _car doorPhase "door_4_source";
  65.         if (_doorState == 1) then
  66.         {
  67.             _car animateDoor ["door_4_source",0,false];
  68.         }
  69.         else
  70.         {
  71.             _car animateDoor ["door_4_source",1,false];
  72.         };
  73.         removeallActions _car;
  74.         _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",5];
  75.         if (_doorState == 1) then
  76.         {
  77.             _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  78.         }
  79.         else
  80.         {
  81.             _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",5];
  82.         };
  83.         if (count attachedObjects _car > 0) then
  84.         {
  85.             _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  86.         };
  87.     };
  88.  
  89.     case "B_Heli_Transport_03_unarmed_F":
  90.     {
  91.         _doorState = _car doorPhase "Door_rear_source";
  92.         if (_doorState == 1) then
  93.         {
  94.             _car animateDoor ["Door_rear_source", 0,false];
  95.         }
  96.         else
  97.         {
  98.             _car animateDoor ["Door_rear_source", 1,false];
  99.         };
  100.         removeallActions _car;
  101.         _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",6];
  102.         if (_doorState == 1) then
  103.         {
  104.             _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",6];
  105.         }
  106.         else
  107.         {
  108.             _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",6];
  109.         };
  110.         if (count attachedObjects _car > 0) then
  111.         {      
  112.             _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  113.         };
  114.     };
  115.  
  116.     case "O_MRAP_02_F":
  117.     {
  118.         _doorState = _car doorPhase "Door_rear";
  119.         if (_doorState == 1) then
  120.         {
  121.             _car animateDoor ["Door_rear", 0,false];
  122.         }
  123.         else
  124.         {
  125.             _car animateDoor ["Door_rear", 1,false];
  126.         };
  127.         removeallActions _car;
  128.         _car addAction ["In Fahrzeug ablegen","placeInObj.sqf",nil,1.5,false,false,"","true",6];
  129.         if (_doorState == 1) then
  130.         {
  131.             _car addAction ["Kofferraum oeffnen","openTunk.sqf",nil,1.5,false,false,"","true",6];
  132.         }
  133.         else
  134.         {
  135.             _car addAction ["Kofferraum schliessen","openTunk.sqf",nil,1.5,false,false,"","true",6];
  136.         };
  137.         if (count attachedObjects _car > 0) then
  138.         {      
  139.             _car addAction ["Aus Fahrzeug entfernen","carryObj.sqf"];
  140.         };
  141.     };
  142.  
  143.  
  144. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement