Advertisement
skotracker

IgiLoad.sqf

Apr 19th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 212.48 KB | None | 0 0
  1. //////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2. //  IgiLoad v0.9.10_RC_e_(Arma3_1.32)                                                                       //
  3. //  Version info: This is not official version of IgiLoad it is only WIP (RC)                               //
  4. //  Author: Igi_PL                                                                                          //
  5. //  Web: http://www.igipl.net/                                                                              //
  6. //  Version date: 2014.10.16                                                                                //
  7. //                                                                                                          //
  8. //  USE:                                                                                                    //
  9. //  1. In mission "init.sqf" add line: "0 = execVM "IgiLoad\IgiLoadInit.sqf";".                             //
  10. //  2. In vehicles "INITIALIZATION" field type: "0 = [this] execVM "IgiLoad\IgiLoad.sqf";"                  //
  11. //  3. Unload from script or trigger:                                                                       //
  12. //      a) Unloading cargo from script. Force unload: "0 = [Car, true, "L"] spawn IL_Do_Unload;"            //
  13. //      b) Unloading cargo from script. Force unload: "0 = [Car, true] spawn IL_Do_Unload;"                 //
  14. //      c) Unloading cargo from script. Force unload: "0 = [Car] spawn IL_Do_Unload;"                       //
  15. //  4. Loading cargo from script. Force load: "0 = [Car, [typeOf Box], "B", true, Box] spawn IL_Do_Load;"   //
  16. //                                                                                                          //
  17. //  Ways from points 1 and 2 can not be used simultaneously!!!                                              //
  18. //////////////////////////////////////////////////////////////////////////////////////////////////////////////
  19.  
  20. waitUntil { time > 0 };
  21. IL_Script_Inst = time;
  22. //  VARIABLES
  23. _obj_main = _this select 0;
  24. _obj_main_type = (typeOf _obj_main);
  25.  
  26. if (isnil "IL_Variables") then
  27. {
  28.     IL_Variables = true;
  29.     //Check new vehicles time
  30.     IL_Check_Veh_Min = 15;
  31.     IL_Check_Veh_Max = 30;
  32.     //Dealing with cargo damage
  33.     //-1 - do nothing
  34.     //0 - set to 0
  35.     //1 - keep such as before loading/unloading
  36.     IL_CDamage = -1;   /// fix for repair car by load/unload
  37.     //AddAction menu position
  38.     IL_Action_LU_Priority = 30; //Load and (para)unload
  39.     IL_Action_O_Priority = 0;   //Open and close
  40.     IL_Action_S_Priority = 0; //Setup
  41.     //Maximum capacity for vehicles
  42.     IL_Num_Slots_OFFROAD = -2;
  43.     IL_Num_Slots_VAN = -3;
  44.     IL_Num_Slots_MOHAWK = -7;
  45.     IL_num_Slots_CHINOOK = -8;
  46.     IL_Num_Slots_KAMAZ = -10;
  47.     IL_Num_Slots_TEMPEST = -10;
  48.     IL_Num_Slots_HEMTT = -10;
  49.     IL_Num_Slots_URAL_COVERED = -5;
  50.     IL_Num_Slots_URAL_OPEN = -10;
  51.     IL_Num_Slots_MH9 = -4;
  52.     IL_Num_Slots_V3S = -5;
  53.     IL_Num_Slots_BLACKFISH = -12;
  54.     IL_Num_Slots_Y32 = -7;
  55.     IL_num_Slots_HURON = -8;
  56.     IL_Num_Slots_LANDROVER = -4;
  57.     IL_Num_Slots_AMBULANCE = -3;
  58.     IL_Num_Slots_HUNTER = -4;
  59.     IL_Num_Slots_IFRIT = -4;
  60.     IL_Num_Slots_STRIDER = -4;
  61.     //Player addScore after loading and unloading
  62.     IL_Load_Score = 20;
  63.     //Para unload score = 2 * IL_Unload_Score
  64.     IL_Unload_Score = 10;
  65.     //The minimum altitude for the drop with parachute
  66.     IL_Para_Drop_ATL = 500;
  67.     IL_Para_Jump_ATL = 300;
  68.     //The minimum altitude for parachute opening
  69.     IL_Para_Drop_Open_ATL = 150;
  70.     IL_Para_Jump_Open_ATL = 150;
  71.     //Parachute get velocity from player or cargo
  72.     IL_Para_Drop_Velocity = true;
  73.     IL_Para_Jump_Velocity = true;
  74.     //Set smoke and light for parachute drop.
  75.     IL_Para_Smoke = true;
  76.     IL_Para_Light = true;
  77.     //Additional smoke after landing
  78.     IL_Para_Smoke_Add = true;
  79.     //Additional light after landing
  80.     IL_Para_Light_Add = true;
  81.     //Smoke and light color
  82.     IL_Para_Smoke_Default = "SmokeshellGreen";
  83.     IL_Para_Light_Default = "Chemlight_green";
  84.     IL_Para_Smoke_Veh = "SmokeshellBlue";
  85.     IL_Para_Light_Veh = "Chemlight_blue";
  86.     //This allows for loading or unloading, if a player is in the area of loading or copilot
  87.     IL_Can_Inside = true;
  88.     IL_Can_CoPilot = true;
  89.     IL_Can_Outside = true;
  90.     //IL_SDistU = 20;//No longer needed
  91.     IL_SDistL = 2.5;
  92.     IL_SDistL_Heli_offset = 1;
  93.     //Load and unload (not para) max speed in km/h
  94.     IL_LU_Speed = 10;
  95.     //Load and unload (not para) max height in m
  96.     IL_LU_Alt = 3;
  97.     //Enable or disable usable cargo ramp in CH-49
  98.     IL_Ramp = true;
  99.     //Enable change of vehicle mass
  100.     IL_Mass = true;
  101.  
  102.     IL_Supported_Vehicles_OFFROAD =
  103.     [
  104.         "Exile_Car_Offroad_Repair_Civillian",
  105.         "Exile_Car_Offroad_Repair_Red",
  106.         "Exile_Car_Offroad_Repair_Beige",
  107.         "Exile_Car_Offroad_Repair_White",
  108.         "Exile_Car_Offroad_Repair_Blue",
  109.         "Exile_Car_Offroad_Repair_DarkRed",
  110.         "Exile_Car_Offroad_Repair_BlueCustom",
  111.         "Exile_Car_Offroad_Repair_Guerilla01",
  112.         "Exile_Car_Offroad_Repair_Guerilla02",
  113.         "Exile_Car_Offroad_Repair_Guerilla03",
  114.         "Exile_Car_Offroad_Repair_Guerilla04",
  115.         "Exile_Car_Offroad_Repair_Guerilla05",
  116.         "Exile_Car_Offroad_Repair_Guerilla06",
  117.         "Exile_Car_Offroad_Repair_Guerilla07",
  118.         "Exile_Car_Offroad_Repair_Guerilla08",
  119.         "Exile_Car_Offroad_Repair_Guerilla09",
  120.         "Exile_Car_Offroad_Repair_Guerilla10",
  121.         "Exile_Car_Offroad_Repair_Guerilla11",
  122.         "Exile_Car_Offroad_Repair_Guerilla12",
  123.         "Exile_Car_Offroad_Red",
  124.         "B_G_Offroad_01_armed_F",
  125. "O_G_Offroad_01_armed_F",
  126. "I_G_Offroad_01_armed_F",
  127.         "Exile_Car_Offroad_Beige",
  128.         "Exile_Car_Offroad_White",
  129.         "Exile_Car_Offroad_Blue",
  130.         "Exile_Car_Offroad_DarkRed",
  131.         "Exile_Car_Offroad_BlueCustom",
  132.         "Exile_Car_Offroad_Guerilla01",
  133.         "Exile_Car_Offroad_Guerilla02",
  134.         "Exile_Car_Offroad_Guerilla03",
  135.         "Exile_Car_Offroad_Guerilla04",
  136.         "Exile_Car_Offroad_Guerilla05",
  137.         "Exile_Car_Offroad_Guerilla06",
  138.         "Exile_Car_Offroad_Guerilla07",
  139.         "Exile_Car_Offroad_Guerilla08",
  140.         "Exile_Car_Offroad_Guerilla09",
  141.         "Exile_Car_Offroad_Guerilla10",
  142.         "Exile_Car_Offroad_Guerilla11",
  143.         "Exile_Car_Offroad_Guerilla12",
  144.         "Exile_Car_Offroad_Rusty1",
  145.         "Exile_Car_Offroad_Rusty2",
  146.         "Exile_Car_Offroad_Rusty3"
  147.     ];
  148.     IL_Supported_Vehicles_VAN =
  149.     [
  150.         "Exile_Car_Van_Black",
  151.         "Exile_Car_Van_White",
  152.         "Exile_Car_Van_Red",
  153.         "Exile_Car_Van_Guerilla01",
  154.         "Exile_Car_Van_Guerilla02",
  155.         "Exile_Car_Van_Guerilla03",
  156.         "Exile_Car_Van_Guerilla04",
  157.         "Exile_Car_Van_Guerilla05",
  158.         "Exile_Car_Van_Guerilla06",
  159.         "Exile_Car_Van_Guerilla07",
  160.         "Exile_Car_Van_Guerilla08",
  161.         "Exile_Car_Van_Box_Black",
  162.         "Exile_Car_Van_Box_White",
  163.         "Exile_Car_Van_Box_Red",
  164.         "Exile_Car_Van_Box_Guerilla01",
  165.         "Exile_Car_Van_Box_Guerilla02",
  166.         "Exile_Car_Van_Box_Guerilla03",
  167.         "Exile_Car_Van_Box_Guerilla04",
  168.         "Exile_Car_Van_Box_Guerilla05",
  169.         "Exile_Car_Van_Box_Guerilla06",
  170.         "Exile_Car_Van_Box_Guerilla07",
  171.         "Exile_Car_Van_Box_Guerilla08"
  172.     ];
  173.     IL_Supported_Vehicles_HEMTT =
  174.     [
  175.         "Exile_Car_HEMMT",
  176.         "B_Truck_01_covered_F",
  177.         "B_Truck_01_box_F",
  178.         "B_T_Truck_01_transport_F"
  179.     ];
  180.     IL_Supported_Vehicles_URAL_COVERED =
  181.     [
  182.  
  183.     ];
  184.     IL_Supported_Vehicles_URAL_OPEN =
  185.     [
  186.  
  187.         "rhsusf_M1078A1P2_wd_fmtv_usarmy",
  188.         "rhsusf_M1078A1P2_d_fmtv_usarmy",
  189.         "rhsusf_M1078A1P2_wd_open_fmtv_usarmy",
  190.         "rhsusf_M1078A1P2_d_open_fmtv_usarmy",
  191.         "rhsusf_M1078A1P2_wd_flatbed_fmtv_usarmy",
  192.         "rhsusf_M1078A1P2_d_flatbed_fmtv_usarmy",
  193.         "rhsusf_M1078A1P2_B_d_fmtv_usarmy",
  194.         "rhsusf_M1078A1P2_B_wd_fmtv_usarmy",
  195.         "rhsusf_M1078A1P2_B_wd_open_fmtv_usarmy",
  196.         "rhsusf_M1078A1P2_B_d_open_fmtv_usarmy",
  197.         "rhsusf_M1078A1P2_B_wd_flatbed_fmtv_usarmy",
  198.         "rhsusf_M1078A1P2_B_d_flatbed_fmtv_usarmy",
  199.         "rhs_uaz_open_MSV_01"
  200.  
  201.     ];
  202.     IL_Supported_Vehicles_KAMAZ =
  203.     [
  204.         "I_Truck_02_covered_F",
  205.         "I_Truck_02_transport_F",
  206.         "Exile_Car_Zamak",
  207.         "O_Truck_02_transport_F",
  208.         "C_Truck_02_transport_F"
  209.     ];
  210.     IL_Supported_Vehicles_TEMPEST = ["Exile_Car_Tempest"];
  211.  
  212.     IL_Supported_Vehicles_MOHAWK =
  213.     [
  214.     "Exile_Chopper_Mohawk_FIA",
  215.     "O_Heli_Light_02_dynamicLoadout_F",
  216.     "Exile_Chopper_Orca_BlackCustom",
  217.     "Exile_Chopper_Orca_Black",
  218.     "Exile_Chopper_Orca_CSAT",
  219.     "O_Heli_Light_02_F",
  220.     "O_Heli_Light_02_F_Unarmed",
  221.     "O_Heli_Light_02_v2_F"
  222.     ];
  223.  
  224.     IL_Supported_Vehicles_CHINOOK =
  225.     [
  226.     ];
  227.     IL_Supported_Vehicles_HURON =
  228.     [
  229.         "B_Heli_Transport_03_black_F",
  230.         "B_Heli_Transport_03_F",
  231.         "Exile_Chopper_Huron_Black",
  232.         "Exile_Chopper_Huron_Green",
  233.          "RHS_CH_47F",
  234.         "rhs_CH_47F_10",
  235.         "Exile_Chopper_Taru_Black",
  236.         "Exile_Chopper_Taru_Covered_Black",
  237.         "Exile_Chopper_Taru_Transport_Black",
  238.         "Exile_Chopper_Taru_CSAT",
  239.         "Exile_Chopper_Taru_Covered_CSAT",
  240.         "Exile_Chopper_Taru_Transport_CSAT"
  241.     ];
  242.     IL_Supported_Vehicles_MH9 =
  243.     [
  244.         "Exile_Chopper_Hummingbird_Green",
  245.         "Exile_Chopper_Hummingbird_Civillian_Blue",
  246.         "Exile_Chopper_Hummingbird_Civillian_Red",
  247.         "Exile_Chopper_Hummingbird_Civillian_ION",
  248.         "Exile_Chopper_Hummingbird_Civillian_BlueLine",
  249.         "Exile_Chopper_Hummingbird_Civillian_Digital",
  250.         "Exile_Chopper_Hummingbird_Civillian_Elliptical",
  251.         "Exile_Chopper_Hummingbird_Civillian_Furious",
  252.         "Exile_Chopper_Hummingbird_Civillian_GrayWatcher",
  253.         "Exile_Chopper_Hummingbird_Civillian_Jeans",
  254.         "Exile_Chopper_Hummingbird_Civillian_Light",
  255.         "Exile_Chopper_Hummingbird_Civillian_Shadow",
  256.         "Exile_Chopper_Hummingbird_Civillian_Sheriff",
  257.         "Exile_Chopper_Hummingbird_Civillian_Speedy",
  258.         "Exile_Chopper_Hummingbird_Civillian_Sunset",
  259.         "Exile_Chopper_Hummingbird_Civillian_Vrana",
  260.         "Exile_Chopper_Hummingbird_Civillian_Wasp",
  261.         "Exile_Chopper_Hummingbird_Civillian_Wave",
  262.         "B_Heli_Light_01_armed_F",
  263.         "B_Heli_Attack_01_F",
  264.         "B_Heli_Transport_01_F",
  265.         "B_Heli_Transport_01_camo_F",
  266.         "O_Heli_Attack_02_F",
  267.         "O_Heli_Attack_02_black_F",
  268.         "I_Heli_Transport_02_F",
  269.         "I_Heli_light_03_F",
  270.          "B_Heli_Light_01_F",
  271.         "B_Heli_Light_01_stripped_F",
  272.         "B_Heli_Transport_03_unarmed_F",
  273.         "B_Heli_Transport_03_unarmed_green_F",
  274.         "O_Heli_Transport_04_F",
  275.         "O_Heli_Transport_04_ammo_F",
  276.         "O_Heli_Transport_04_bench_F",
  277.         "O_Heli_Transport_04_box_F",
  278.         "O_Heli_Transport_04_covered_F",
  279.         "O_Heli_Transport_04_fuel_F",
  280.         "O_Heli_Transport_04_medevac_F",
  281.         "O_Heli_Transport_04_repair_F",
  282.         "O_Heli_Transport_04_black_F",
  283.         "O_Heli_Transport_04_ammo_black_F",
  284.         "O_Heli_Transport_04_bench_black_F",
  285.         "O_Heli_Transport_04_box_black_F",
  286.         "O_Heli_Transport_04_covered_black_F",
  287.         "O_Heli_Transport_04_fuel_black_F",
  288.         "O_Heli_Transport_04_medevac_black_F",
  289.         "O_Heli_Transport_04_repair_black_F",
  290.         "I_Heli_light_03_unarmed_F"
  291.     ];
  292.     IL_Supported_Vehicles_V3S =
  293.     [
  294.         "Exile_Car_V3S_Open",
  295.         "Exile_Car_V3S_Covered"
  296.     ];
  297.     IL_Supported_Vehicles_BLACKFISH =
  298.     [
  299.         "B_T_VTOL_01_armed_F",
  300.         "Exile_Plane_BlackfishInfantry",
  301.         "Exile_Plane_BlackfishVehicle",
  302.         "RHS_C130J"
  303.     ];
  304.     IL_Supported_Vehicles_Y32 =
  305.     [
  306.         "O_T_VTOL_02_infantry_F",
  307.         "O_T_VTOL_02_vehicle_F"
  308.     ];
  309.     IL_Supported_Vehicles_HUNTER =
  310.     [
  311.         "Exile_Car_Hunter"
  312.     ];
  313.     IL_Supported_Vehicles_IFRIT =
  314.     [
  315.         "Exile_Car_Ifrit"
  316.     ];
  317.     IL_Supported_Vehicles_STRIDER =
  318.     [
  319.         "Exile_Car_Strider"
  320.     ];
  321.     IL_Supported_Vehicles_LANDROVER =
  322.     [
  323.         "Exile_Car_LandRover_Red",
  324.         "Exile_Car_LandRover_Urban",
  325.         "Exile_Car_LandRover_Green",
  326.         "Exile_Car_LandRover_Sand",
  327.         "Exile_Car_LandRover_Desert"
  328.     ];
  329.     IL_Supported_Vehicles_AMBULANCE =
  330.     [
  331.         "Exile_Car_LandRover_Ambulance_Green",
  332.         "Exile_Car_LandRover_Ambulance_Sand",
  333.         "Exile_Car_LandRover_Ambulance_Desert"
  334.     ];
  335.  
  336.     IL_Supported_Vehicles_All = IL_Supported_Vehicles_MH9 + IL_Supported_Vehicles_MOHAWK + IL_Supported_Vehicles_KAMAZ + IL_Supported_Vehicles_TEMPEST + IL_Supported_Vehicles_HEMTT + IL_Supported_Vehicles_URAL_COVERED + IL_Supported_Vehicles_URAL_OPEN + IL_Supported_Vehicles_VAN + IL_Supported_Vehicles_OFFROAD + IL_Supported_Vehicles_CHINOOK + IL_Supported_Vehicles_V3S + IL_Supported_Vehicles_BLACKFISH + IL_Supported_Vehicles_Y32 + IL_Supported_Vehicles_HURON + IL_Supported_Vehicles_HUNTER + IL_Supported_Vehicles_IFRIT + IL_Supported_Vehicles_STRIDER + IL_Supported_Vehicles_LANDROVER + IL_Supported_Vehicles_AMBULANCE;
  337.     IL_Para_Drop_Vehicles = IL_Supported_Vehicles_MH9 + IL_Supported_Vehicles_MOHAWK + IL_Supported_Vehicles_CHINOOK + IL_Supported_Vehicles_BLACKFISH + IL_Supported_Vehicles_Y32 + IL_Supported_Vehicles_HURON;
  338.  
  339.     IL_Supported_Bicycles =
  340.     [
  341.         "Exile_Bike_OldBike",
  342.         "Exile_Bike_MountainBike",
  343.         "Exile_Bike_Crosser"
  344.     ];
  345.     IL_Supported_Karts =
  346.     [
  347.         "Exile_Car_Kart_BluKing",
  348.         "Exile_Car_Kart_RedStone",
  349.         "Exile_Car_Kart_Vrana",
  350.         "Exile_Car_Kart_Green",
  351.         "Exile_Car_Kart_Blue",
  352.         "Exile_Car_Kart_Orange",
  353.         "Exile_Car_Kart_White",
  354.         "Exile_Car_Kart_Yellow",
  355.         "Exile_Car_Kart_Black"
  356.     ];
  357.     IL_Supported_HEMTT =
  358.     [
  359.         "Exile_Car_HEMMT",
  360.         "B_Truck_01_covered_F",
  361.         "B_Truck_01_box_F",
  362.         "B_T_Truck_01_transport_F"
  363.     ];
  364.     IL_Supported_KAMAZ =
  365.     [
  366.         "I_Truck_02_covered_F",
  367.         "I_Truck_02_transport_F",
  368.         "O_Truck_02_transport_F",
  369.         "C_Truck_02_transport_F",
  370.         "Exile_Car_Zamak"
  371.     ];
  372.     IL_Supported_TEMPEST =
  373.     [
  374.         "Exile_Car_Tempest",
  375.         "O_Truck_03_repair_F",
  376.         "O_Truck_03_fuel_F",
  377.         "O_Truck_03_device_F",
  378.         "O_Truck_03_transport_F",
  379.         "O_Truck_03_ammo_F"
  380.     ];
  381.     IL_Supported_URAL =
  382.     [
  383.         "Exile_Car_Ural_Open_Blue",
  384.         "Exile_Car_Ural_Open_Yellow",
  385.         "Exile_Car_Ural_Open_Worker",
  386.         "Exile_Car_Ural_Open_Military",
  387.         "Exile_Car_Ural_Covered_Blue",
  388.         "Exile_Car_Ural_Covered_Yellow",
  389.         "Exile_Car_Ural_Covered_Worker",
  390.         "Exile_Car_Ural_Covered_Military",
  391.         "RHS_Ural_Open_Civ_01",
  392.         "RHS_Ural_Open_Civ_02",
  393.         "RHS_Ural_Open_Civ_03",
  394.         "RHS_Ural_Open_MSV_01",
  395.         "RHS_Ural_Open_VDV_01",
  396.         "RHS_Ural_Open_VMF_01",
  397.         "RHS_Ural_Open_VV_01",
  398.         "RHS_Ural_MSV_01",
  399.         "RHS_Ural_VDV_01",
  400.         "RHS_Ural_VMF_01",
  401.         "RHS_Ural_VV_01",
  402.         "RHS_Ural_Open_Flat_MSV_01",
  403.         "RHS_Ural_Open_Flat_VDV_01",
  404.         "RHS_Ural_Open_Flat_VMF_01",
  405.         "RHS_Ural_Open_Flat_VV_01",
  406.         "RHS_Ural_Fuel_MSV_01",
  407.         "RHS_Ural_Fuel_VDV_01",
  408.         "RHS_Ural_Fuel_VMF_01",
  409.         "RHS_Ural_Fuel_VV_01",
  410.         "RHS_Ural_Flat_MSV_01",
  411.         "RHS_Ural_Flat_VDV_01",
  412.         "RHS_Ural_Flat_VMF_01",
  413.         "RHS_Ural_Flat_VV_01",
  414.         "rhs_typhoon_vdv"
  415.     ];
  416.     IL_Supported_Strider =
  417.     [
  418.         "I_MRAP_03_hmg_F",
  419.         "I_MRAP_03_gmg_F",
  420.         "Exile_Car_Strider"
  421.     ];
  422.     IL_Supported_Hunter =
  423.     [
  424.         "B_MRAP_01_hmg_F",
  425.         "B_MRAP_01_gmg_F",
  426.         "Exile_Car_Hunter"
  427.     ];
  428.     IL_Supported_Ifrit =
  429.     [
  430.         "O_MRAP_02_hmg_F",
  431.         "O_MRAP_02_GMG_F",
  432.         "Exile_Car_Ifrit"
  433.     ];
  434.     IL_Supported_UGV =
  435.     [
  436.         "B_UGV_01_rcws_F",
  437.         "B_UGV_01_F",
  438.         "O_UGV_01_rcws_F",
  439.         "O_UGV_01_F",
  440.         "I_UGV_01_rcws_F",
  441.         "I_UGV_01_F"
  442.     ];
  443.     IL_Supported_VAN =
  444.     [
  445.         "Exile_Car_Van_Black",
  446.         "Exile_Car_Van_White",
  447.         "Exile_Car_Van_Red",
  448.         "Exile_Car_Van_Guerilla01",
  449.         "Exile_Car_Van_Guerilla02",
  450.         "Exile_Car_Van_Guerilla03",
  451.         "Exile_Car_Van_Guerilla04",
  452.         "Exile_Car_Van_Guerilla05",
  453.         "Exile_Car_Van_Guerilla06",
  454.         "Exile_Car_Van_Guerilla07",
  455.         "Exile_Car_Van_Guerilla08",
  456.         "Exile_Car_Van_Box_Black",
  457.         "Exile_Car_Van_Box_White",
  458.         "Exile_Car_Van_Box_Red",
  459.         "Exile_Car_Van_Box_Guerilla01",
  460.         "Exile_Car_Van_Box_Guerilla02",
  461.         "Exile_Car_Van_Box_Guerilla03",
  462.         "Exile_Car_Van_Box_Guerilla04",
  463.         "Exile_Car_Van_Box_Guerilla05",
  464.         "Exile_Car_Van_Box_Guerilla06",
  465.         "Exile_Car_Van_Box_Guerilla07",
  466.         "Exile_Car_Van_Box_Guerilla08",
  467.         "Exile_Car_Van_Fuel_Black",
  468.         "Exile_Car_Van_Fuel_White",
  469.         "Exile_Car_Van_Fuel_Red",
  470.         "Exile_Car_Van_Fuel_Guerilla01",
  471.         "Exile_Car_Van_Fuel_Guerilla02",
  472.         "Exile_Car_Van_Fuel_Guerilla03"
  473.     ];
  474.     IL_Supported_OFFROAD =
  475.     [
  476.         "Exile_Car_Offroad_Red",
  477.         "Exile_Car_Offroad_Beige",
  478.         "Exile_Car_Offroad_White",
  479.         "Exile_Car_Offroad_Blue",
  480.         "Exile_Car_Offroad_DarkRed",
  481.         "Exile_Car_Offroad_BlueCustom",
  482.         "Exile_Car_Offroad_Guerilla01",
  483.         "Exile_Car_Offroad_Guerilla02",
  484.         "Exile_Car_Offroad_Guerilla03",
  485.         "Exile_Car_Offroad_Guerilla04",
  486.         "Exile_Car_Offroad_Guerilla05",
  487.         "Exile_Car_Offroad_Guerilla06",
  488.         "Exile_Car_Offroad_Guerilla07",
  489.         "Exile_Car_Offroad_Guerilla08",
  490.         "Exile_Car_Offroad_Guerilla09",
  491.         "Exile_Car_Offroad_Guerilla10",
  492.         "Exile_Car_Offroad_Guerilla11",
  493.         "Exile_Car_Offroad_Guerilla12",
  494.         "Exile_Car_Offroad_Rusty1",
  495.         "Exile_Car_Offroad_Rusty2",
  496.         "Exile_Car_Offroad_Rusty3",
  497.         "B_G_Offroad_01_armed_F",
  498.         "O_G_Offroad_01_armed_F",
  499.         "I_G_Offroad_01_armed_F",
  500.         "Exile_Car_Offroad_Armed_Guerilla01",
  501.         "Exile_Car_Offroad_Armed_Guerilla02",
  502.         "Exile_Car_Offroad_Armed_Guerilla03",
  503.         "Exile_Car_Offroad_Armed_Guerilla04",
  504.         "Exile_Car_Offroad_Armed_Guerilla05",
  505.         "Exile_Car_Offroad_Armed_Guerilla06",
  506.         "Exile_Car_Offroad_Armed_Guerilla07",
  507.         "Exile_Car_Offroad_Armed_Guerilla08",
  508.         "Exile_Car_Offroad_Armed_Guerilla09",
  509.         "Exile_Car_Offroad_Armed_Guerilla10",
  510.         "Exile_Car_Offroad_Armed_Guerilla11",
  511.         "Exile_Car_Offroad_Armed_Guerilla12",
  512.         "Exile_Car_Offroad_Repair_Civillian",
  513.         "Exile_Car_Offroad_Repair_Red",
  514.         "Exile_Car_Offroad_Repair_Beige",
  515.         "Exile_Car_Offroad_Repair_White",
  516.         "Exile_Car_Offroad_Repair_Blue",
  517.         "Exile_Car_Offroad_Repair_DarkRed",
  518.         "Exile_Car_Offroad_Repair_BlueCustom",
  519.         "Exile_Car_Offroad_Repair_Guerilla01",
  520.         "Exile_Car_Offroad_Repair_Guerilla02",
  521.         "Exile_Car_Offroad_Repair_Guerilla03",
  522.         "Exile_Car_Offroad_Repair_Guerilla04",
  523.         "Exile_Car_Offroad_Repair_Guerilla05",
  524.         "Exile_Car_Offroad_Repair_Guerilla06",
  525.         "Exile_Car_Offroad_Repair_Guerilla07",
  526.         "Exile_Car_Offroad_Repair_Guerilla08",
  527.         "Exile_Car_Offroad_Repair_Guerilla09",
  528.         "Exile_Car_Offroad_Repair_Guerilla10",
  529.         "Exile_Car_Offroad_Repair_Guerilla11",
  530.         "Exile_Car_Offroad_Repair_Guerilla12"
  531.     ];
  532.     IL_Supported_SUV =
  533.     [
  534.         "Exile_Car_SUV_Red",
  535.         "Exile_Car_SUV_Black",
  536.         "Exile_Car_SUV_Grey",
  537.         "Exile_Car_SUV_Orange",
  538.         "Exile_Car_SUV_Armed_Black"
  539.     ];
  540.     IL_Supported_Hatchback =
  541.     [
  542.         "Exile_Car_Hatchback_Beige",
  543.         "Exile_Car_Hatchback_Green",
  544.         "Exile_Car_Hatchback_Blue",
  545.         "Exile_Car_Hatchback_BlueCustom",
  546.         "Exile_Car_Hatchback_BeigeCustom",
  547.         "Exile_Car_Hatchback_Yellow",
  548.         "Exile_Car_Hatchback_Grey",
  549.         "Exile_Car_Hatchback_Black",
  550.         "Exile_Car_Hatchback_Dark",
  551.         "Exile_Car_Hatchback_Rusty1",
  552.         "Exile_Car_Hatchback_Rusty2",
  553.         "Exile_Car_Hatchback_Rusty3",
  554.         "Exile_Car_Hatchback_Sport_Red",
  555.         "Exile_Car_Hatchback_Sport_Blue",
  556.         "Exile_Car_Hatchback_Sport_Orange",
  557.         "Exile_Car_Hatchback_Sport_White",
  558.         "Exile_Car_Hatchback_Sport_Beige",
  559.         "Exile_Car_Hatchback_Sport_Green"
  560.     ];
  561.     IL_Supported_Lada =
  562.     [
  563.         "Exile_Car_Lada_Green",
  564.         "Exile_Car_Lada_Taxi",
  565.         "Exile_Car_Lada_Red",
  566.         "Exile_Car_Lada_White",
  567.         "Exile_Car_Lada_Hipster"
  568.     ];
  569.     IL_Supported_Volha =
  570.     [
  571.         "Exile_Car_Volha_Blue",
  572.         "Exile_Car_Volha_White",
  573.         "Exile_Car_Volha_Black"
  574.     ];
  575.     IL_Supported_UAZ =
  576.     [
  577.         "Exile_Car_UAZ_Green",
  578.         "Exile_Car_UAZ_Open_Green",
  579.         "RHS_UAZ_MSV_01",
  580.         "rhs_uaz_open_MSV_01",
  581.         "rhs_uaz_vdv"
  582.     ];
  583.     IL_Supported_Octavius =
  584.     [
  585.         "Exile_Car_Octavius_White",
  586.         "Exile_Car_Octavius_Black"
  587.     ];
  588.         IL_Supported_Tractor =
  589.     [
  590.         "Exile_Car_Tractor_Red"
  591.     ];
  592.         IL_Supported_OldTractor =
  593.     [
  594.         "Exile_Car_OldTractor_Red"
  595.     ];
  596.         IL_Supported_TowTractor =
  597.     [
  598.         "Exile_Car_TowTractor_White"
  599.     ];
  600.     IL_Supported_LandRover =
  601.     [
  602.         "Exile_Car_LandRover_Red",
  603.         "Exile_Car_LandRover_Urban",
  604.         "Exile_Car_LandRover_Green",
  605.         "Exile_Car_LandRover_Sand",
  606.         "Exile_Car_LandRover_Desert"
  607.     ];
  608.     IL_Supported_LandRoverAmbulance =
  609.     [
  610.         "Exile_Car_LandRover_Ambulance_Green",
  611.         "Exile_Car_LandRover_Ambulance_Desert",
  612.         "Exile_Car_LandRover_Ambulance_Sand"
  613.     ];
  614.     IL_Supported_Quadbike =
  615.     [
  616.         "Exile_Bike_QuadBike_Black",
  617.         "Exile_Bike_QuadBike_Blue",
  618.         "Exile_Bike_QuadBike_Red",
  619.         "Exile_Bike_QuadBike_White",
  620.         "Exile_Bike_QuadBike_Nato",
  621.         "Exile_Bike_QuadBike_Csat",
  622.         "Exile_Bike_QuadBike_Fia",
  623.         "Exile_Bike_QuadBike_Guerilla01",
  624.         "Exile_Bike_QuadBike_Guerilla02"
  625.     ];
  626.     IL_Supported_Supply_Crate =
  627.     [
  628.         "B_supplyCrate_F",
  629.         "IG_supplyCrate_F",
  630.         "O_supplyCrate_F",
  631.         "I_supplyCrate_F",
  632.         "C_supplyCrate_F",
  633.         "Exile_Container_SupplyBox"
  634.     ];
  635.     IL_Supported_Veh_Ammo =
  636.     [
  637.         "Box_NATO_AmmoVeh_F",
  638.         "Box_East_AmmoVeh_F",
  639.         "Box_IND_AmmoVeh_F",
  640.         "Land_CargoBox_V1_F",
  641.         "ASC_B_box",
  642.         "I_CargoNet_01_ammo_F",
  643.         "O_CargoNet_01_ammo_F",
  644.         "B_CargoNet_01_ammo_F"
  645.     ];
  646.     IL_Supported_Barrel =
  647.     [
  648.         /*
  649.         "Land_BarrelEmpty_F",
  650.         "Land_BarrelEmpty_grey_F",
  651.         "Land_BarrelSand_F",
  652.         "Land_BarrelSand_grey_F",
  653.         "Land_BarrelTrash_F",
  654.         "Land_BarrelTrash_grey_F",
  655.         "Land_BarrelWater_F",
  656.         "Land_BarrelWater_grey_F",
  657.         "Land_MetalBarrel_F"
  658.         */
  659.     ];  // "Land_MetalBarrel_empty_F","MetalBarrel_burning_F"];
  660.     IL_Supported_Tank =
  661.     [
  662.         /*
  663.         "Land_WaterBarrel_F",
  664.         "Land_WaterTank_F"
  665.         */
  666.     ];
  667.     IL_Supported_Rubberboat =
  668.     [
  669.         "Exile_Boat_RubberDuck_CSAT",
  670.         "Exile_Boat_RubberDuck_Digital",
  671.         "Exile_Boat_RubberDuck_Orange",
  672.         "Exile_Boat_RubberDuck_Blue",
  673.         "Exile_Boat_RubberDuck_Black"
  674.     ];
  675.         IL_Supported_Motorboat =
  676.     [
  677.         "Exile_Boat_MotorBoat_Orange",
  678.         "Exile_Boat_MotorBoat_Police",
  679.         "Exile_Boat_MotorBoat_White"
  680.     ];
  681.     IL_Supported_SDV =
  682.     [
  683.         "Exile_Boat_SDV_CSAT",
  684.         "Exile_Boat_SDV_Digital",
  685.         "Exile_Boat_SDV_Grey"
  686.     ];
  687.     IL_Supported_Box_H1 =
  688.     [
  689.         "Box_NATO_Wps_F",
  690.         "Box_East_Wps_F",
  691.         "Box_IND_Wps_F",
  692.         "Box_East_WpsLaunch_F",
  693.         "Box_NATO_WpsLaunch_F",
  694.         "Box_IND_WpsLaunch_F",
  695.         "Box_IND_WpsSpecial_F",
  696.         "Box_East_WpsSpecial_F",
  697.         "Box_NATO_WpsSpecial_F",
  698.         "Box_mas_all_rifle_Wps_F",
  699.         "Box_mas_us_rifle_Wps_F",
  700.         "Box_mas_ru_rifle_Wps_F",
  701.         "Box_mas_mar_NATO_equip_F",
  702.         "Box_mas_mar_NATO_Wps_F"
  703.     ];
  704.     IL_Supported_Box_H2 =
  705.     [
  706.         "Box_NATO_AmmoOrd_F",
  707.         "Box_East_AmmoOrd_F",
  708.         "Box_IND_AmmoOrd_F",
  709.         "Box_NATO_Grenades_F",
  710.         "Box_East_Grenades_F",
  711.         "Box_IND_Grenades_F",
  712.         "Box_NATO_Ammo_F",
  713.         "Box_East_Ammo_F",
  714.         "Box_IND_Ammo_F",
  715.         "Box_IND_Support_F",
  716.         "Box_East_Support_F",
  717.         "Box_NATO_Support_F"
  718.     ];
  719.     IL_Supported_Cargo20 =
  720.     [
  721.         "Land_Cargo20_blue_F",
  722.         "Land_Cargo20_brick_red_F",
  723.         "Land_Cargo20_cyan_F",
  724.         "Land_Cargo20_grey_F",
  725.         "Land_Cargo20_light_blue_F",
  726.         "Land_Cargo20_light_green_F",
  727.         "Land_Cargo20_military_green_F",
  728.         "Land_Cargo20_orange_F",
  729.         "Land_Cargo20_red_F",
  730.         "Land_Cargo20_sand_F",
  731.         "Land_Cargo20_white_F",
  732.         "Land_Cargo20_yellow_F"
  733.     ];
  734.     IL_Supported_TaruPods =
  735.     [
  736.         "Land_Pod_Heli_Transport_04_ammo_F",
  737.         "Land_Pod_Heli_Transport_04_bench_F",
  738.         "Land_Pod_Heli_Transport_04_box_F",
  739.         "Land_Pod_Heli_Transport_04_covered_F",
  740.         "Land_Pod_Heli_Transport_04_fuel_F",
  741.         "Land_Pod_Heli_Transport_04_medevac_F",
  742.         "Land_Pod_Heli_Transport_04_repair_F",
  743.         "Land_Pod_Heli_Transport_04_ammo_black_F",
  744.         "Land_Pod_Heli_Transport_04_bench_black_F",
  745.         "Land_Pod_Heli_Transport_04_box_black_F",
  746.         "Land_Pod_Heli_Transport_04_covered_black_F",
  747.         "Land_Pod_Heli_Transport_04_fuel_black_F",
  748.         "Land_Pod_Heli_Transport_04_medevac_black_F",
  749.         "Land_Pod_Heli_Transport_04_repair_black_F",
  750.         "B_Slingload_01_Ammo_F",
  751.         "B_Slingload_01_Medical_F",
  752.         "B_Slingload_01_Fuel_F",
  753.         "B_Slingload_01_Repair_F",
  754.         "B_Slingload_01_Cargo_F"
  755.     ];
  756.     IL_Supported_APC =
  757.     [
  758.         "B_APC_Wheeled_01_cannon_F",
  759.         "O_APC_Wheeled_02_rcws_F",
  760.         "I_APC_Wheeled_03_cannon_F"
  761.     ];
  762.     IL_Supported_GOLF =
  763.     [
  764.         "Exile_Car_Golf_Red",
  765.         "Exile_Car_Golf_Black"
  766.     ];
  767.     IL_Supported_V3S =
  768.     [
  769.         "Exile_Car_V3S_Open",
  770.         "Exile_Car_V3S_Covered",
  771.        "rhs_gaz66_vmf",
  772.        "rhs_gaz66_vv",
  773.        "rhs_gaz66_msv",
  774.        "rhs_gaz66_r142_vmf",
  775.        "rhs_gaz66_r142_vdv",
  776.        "rhs_gaz66_r142_msv",
  777.        "rhs_gaz66_r142_vv",
  778.        "rhs_gaz66_repair_vmf",
  779.        "rhs_gaz66_repair_vdv",
  780.        "rhs_gaz66_repair_vv",
  781.        "rhs_gaz66_repair_msv",
  782.        "rhs_gaz66_ammo_vmf",
  783.        "rhs_gaz66_flat_vdv",
  784.        "rhs_gaz66_flat_vmf",
  785.        "rhs_gaz66_flat_vv",
  786.        "rhs_gaz66_flat_msv",
  787.        "rhs_gaz66o_vdv",
  788.        "rhs_gaz66o_vmf",
  789.        "rhs_gaz66o_vv",
  790.        "rhs_gaz66o_msv",
  791.        "rhs_gaz66o_flat_vdv",
  792.        "rhs_gaz66o_flat_vmf",
  793.        "rhs_gaz66o_flat_vv",
  794.         "rhs_gaz66o_flat_msv"
  795.     ];
  796.     IL_Supported_BRDM2 =
  797.     [
  798.         "Exile_Car_BRDM2_HQ",
  799.          "rhs_tigr_vdv",
  800.         "rhs_tigr_ffv_3camo_vdv",
  801.         "rhs_tigr_ffv_vdv",
  802.         "rhs_tigr_m_test"
  803.     ];
  804.     IL_Supported_BTR40 =
  805.     [
  806.         "Exile_Car_BTR40_MG_Green",
  807.         "Exile_Car_BTR40_MG_Camo",
  808.         "Exile_Car_BTR40_Green",
  809.         "Exile_Car_BTR40_Camo",
  810.         "rhs_btr60_vmf",
  811.         "rhs_btr60_vdv",
  812.         "rhs_btr60_vv",
  813.         "rhs_btr60_msv",
  814.         "RHS_BTR70",
  815.         "RHS_BTR70_MSV",
  816.         "RHS_BTR70_VDV",
  817.         "RHS_BTR70_VMF",
  818.         "RHS_BTR70_VV",
  819.         "RHS_BTR80_MSV",
  820.         "RHS_BTR80_VDV",
  821.         "RHS_BTR80_VMF",
  822.         "RHS_BTR80_VV",
  823.         "RHS_BTR80A_MSV",
  824.         "RHS_BTR80A_VDV",
  825.         "RHS_BTR80A_VMF",
  826.         "RHS_BTR80A_VV"
  827.     ];
  828.     IL_Supported_HMMWV =
  829.     [
  830.         "HMMWV_M2_GPK_Base",
  831.         "Exile_Car_HMMWV_M134_Green",
  832.         "Exile_Car_HMMWV_M134_Desert",
  833.         "Exile_Car_HMMWV_M2_Green",
  834.         "Exile_Car_HMMWV_M2_Desert",
  835.         "Exile_Car_HMMWV_MEV_Green",
  836.         "Exile_Car_HMMWV_MEV_Desert",
  837.         "Exile_Car_HMMWV_UNA_Green",
  838.         "Exile_Car_HMMWV_UNA_Desert",
  839.         "rhsusf_m1025_w",
  840.         "rhsusf_m1025_d",
  841.         "rhsusf_m1025_w_m2",
  842.         "rhsusf_m998_w_2dr",
  843.         "rhsusf_m998_w_4dr",
  844.         "rhsusf_m998_w_s_2dr_fulltop",
  845.         "rhsusf_m998_d_s_2dr_fulltop",
  846.         "rhsusf_m998_w_s_2dr_halftop",
  847.         "rhsusf_m998_d_s_2dr_halftop",
  848.         "rhsusf_m998_d_s_4dr_fulltop",
  849.         "rhsusf_m998_w_s_4dr_fulltop",
  850.         "rhsusf_m998_d_s_4dr_halftop",
  851.         "rhsusf_m998_w_s_4dr_halftop",
  852.         "rhsusf_m1025_w_s_m2"
  853.     ];
  854.     IL_Supported_WATERSCOOTER =
  855.     [
  856.         "Exile_Boat_WaterScooter"
  857.     ];
  858.     IL_Supported_RHIB =
  859.     [
  860.         "Exile_Boat_RHIB"
  861.     ];
  862.     IL_Supported_PROWLER =
  863.     [
  864.         "B_T_LSV_01_armed_F",
  865.         "Exile_Car_ProwlerLight",
  866.         "Exile_Car_ProwlerUnarmed"
  867.     ];
  868.     IL_Supported_QILIN =
  869.     [
  870.         "O_T_LSV_02_armed_F",
  871.         "Exile_Car_QilinUnarmed"
  872.     ];
  873.     IL_Supported_MB4WD =
  874.     [
  875.         "Exile_Car_MB4WD",
  876.         "Exile_Car_MB4WDOpen"
  877.     ];
  878.     //needed for the new Initialization, put all supported Vehicles & all supported Cargo in!!!
  879.     IL_Supported_Init_All = IL_Supported_Vehicles_OFFROAD + IL_Supported_Vehicles_VAN + IL_Supported_Vehicles_HEMTT + IL_Supported_Vehicles_KAMAZ + IL_Supported_Vehicles_TEMPEST + IL_Supported_Vehicles_URAL_COVERED + IL_Supported_Vehicles_URAL_OPEN + IL_Supported_Vehicles_V3S + IL_Supported_Vehicles_MOHAWK + IL_Supported_Vehicles_CHINOOK + IL_Supported_Vehicles_BLACKFISH + IL_Supported_Vehicles_Y32 + IL_Supported_Vehicles_MH9 + IL_Supported_Vehicles_HURON + IL_Supported_Vehicles_HUNTER + IL_Supported_Vehicles_IFRIT + IL_Supported_Vehicles_STRIDER + IL_Supported_Vehicles_LANDROVER + IL_Supported_Vehicles_AMBULANCE + IL_Supported_Bicycles + IL_Supported_Karts + IL_Supported_Lada + IL_Supported_Volha + IL_Supported_UAZ + IL_Supported_Octavius + IL_Supported_Tractor + IL_Supported_OldTractor + IL_Supported_TowTractor + IL_Supported_LandRover + IL_Supported_LandRoverAmbulance + IL_Supported_Motorboat + IL_Supported_HEMTT + IL_Supported_KAMAZ + IL_Supported_TEMPEST + IL_Supported_Strider + IL_Supported_Hunter + IL_Supported_Ifrit + IL_Supported_UGV + IL_Supported_VAN + IL_Supported_OFFROAD + IL_Supported_SUV + IL_Supported_Hatchback + IL_Supported_Quadbike + IL_Supported_Supply_Crate + IL_Supported_Veh_Ammo + IL_Supported_Barrel + IL_Supported_Tank + IL_Supported_Rubberboat + IL_Supported_SDV + IL_Supported_Box_H1 + IL_Supported_Box_H2 + IL_Supported_Cargo20 + IL_Supported_TaruPods + IL_Supported_APC + IL_Supported_GOLF + IL_Supported_V3S + IL_Supported_BRDM2 + IL_Supported_BTR40 + IL_Supported_HMMWV + IL_Supported_WATERSCOOTER + IL_Supported_RHIB + IL_Supported_PROWLER + IL_Supported_QILIN + IL_Supported_MB4WD;
  880.  
  881.     IL_Supported_Cargo_MH9 = IL_Supported_Supply_Crate + IL_Supported_Barrel;
  882.  
  883.     IL_Supported_Cargo_Veh_Offroad = IL_Supported_Quadbike + IL_Supported_Karts + IL_Supported_Bicycles;
  884.     IL_Supported_Cargo_NonVeh_Offroad = IL_Supported_Supply_Crate + IL_Supported_Veh_Ammo + IL_Supported_Barrel + IL_Supported_Tank + IL_Supported_Box_H1 + IL_Supported_Box_H2;
  885.     IL_Supported_Cargo_Offroad = IL_Supported_Cargo_Veh_Offroad + IL_Supported_Cargo_NonVeh_Offroad;
  886.  
  887.     IL_Supported_Cargo_Veh_VAN = IL_Supported_Cargo_Veh_Offroad;
  888.     IL_Supported_Cargo_NonVeh_VAN = IL_Supported_Cargo_NonVeh_Offroad;
  889.     IL_Supported_Cargo_VAN = IL_Supported_Cargo_Veh_VAN + IL_Supported_Cargo_NonVeh_VAN;
  890.  
  891.     IL_Supported_Cargo_Veh_Kamaz = IL_Supported_Quadbike + IL_Supported_Karts + IL_Supported_Rubberboat + IL_Supported_Motorboat + IL_Supported_MB4WD + IL_Supported_SDV + IL_Supported_Lada + IL_Supported_Volha + IL_Supported_Octavius + IL_Supported_UAZ + IL_Supported_TowTractor + IL_Supported_OldTractor + IL_Supported_Tractor + IL_Supported_LandRoverAmbulance + IL_Supported_LandRover + IL_Supported_Hatchback + IL_Supported_UGV + IL_Supported_VAN + IL_Supported_OFFROAD + IL_Supported_SUV + IL_Supported_GOLF + IL_Supported_WATERSCOOTER + IL_Supported_RHIB;
  892.     IL_Supported_Cargo_NonVeh_Kamaz = IL_Supported_Supply_Crate + IL_Supported_Veh_Ammo + IL_Supported_Barrel + IL_Supported_Tank + IL_Supported_Box_H1 + IL_Supported_Box_H2 + IL_Supported_Cargo20;
  893.     IL_Supported_Cargo_Kamaz = IL_Supported_Cargo_Veh_Kamaz + IL_Supported_Cargo_NonVeh_Kamaz;
  894.  
  895.     IL_Supported_Cargo_Veh_HEMTT = IL_Supported_Cargo_Veh_Kamaz + IL_Supported_BTR40 + IL_Supported_HMMWV + IL_Supported_PROWLER + IL_Supported_QILIN;
  896.     IL_Supported_Cargo_NonVeh_HEMTT = IL_Supported_Cargo_NonVeh_Kamaz + IL_Supported_TaruPods;
  897.     IL_Supported_Cargo_HEMTT = IL_Supported_Cargo_Veh_HEMTT + IL_Supported_Cargo_NonVeh_HEMTT;
  898.  
  899.     IL_Supported_Cargo_Veh_URAL_COVERED = IL_Supported_Cargo_Veh_Offroad + IL_Supported_Rubberboat + IL_Supported_SDV + IL_Supported_Lada + IL_Supported_Volha + IL_Supported_Octavius + IL_Supported_UAZ + IL_Supported_TowTractor + IL_Supported_OldTractor;
  900.     IL_Supported_Cargo_NonVeh_URAL_COVERED = IL_Supported_Cargo_NonVeh_Kamaz;
  901.     IL_Supported_Cargo_URAL_COVERED = IL_Supported_Cargo_Veh_URAL_COVERED + IL_Supported_Cargo_NonVeh_URAL_COVERED;
  902.  
  903.     IL_Supported_Cargo_Veh_URAL_OPEN = IL_Supported_Cargo_Veh_Kamaz;
  904.     IL_Supported_Cargo_NonVeh_URAL_OPEN = IL_Supported_Cargo_NonVeh_Kamaz + IL_Supported_TaruPods;
  905.     IL_Supported_Cargo_URAL_OPEN = IL_Supported_Cargo_Veh_URAL_OPEN + IL_Supported_Cargo_NonVeh_URAL_OPEN;
  906.  
  907.     IL_Supported_Cargo_Veh_TEMPEST = IL_Supported_Cargo_Veh_Kamaz;
  908.     IL_Supported_Cargo_NonVeh_TEMPEST = IL_Supported_Cargo_NonVeh_HEMTT;
  909.     IL_Supported_Cargo_TEMPEST = IL_Supported_Cargo_Veh_TEMPEST + IL_Supported_Cargo_NonVeh_TEMPEST;
  910.  
  911.     IL_Supported_Cargo_Veh_Mohawk = IL_Supported_Quadbike + IL_Supported_Karts + IL_Supported_Rubberboat + IL_Supported_MB4WD + IL_Supported_SDV + IL_Supported_Lada + IL_Supported_Volha + IL_Supported_Octavius + IL_Supported_UAZ + IL_Supported_TowTractor + IL_Supported_OldTractor + IL_Supported_Tractor + IL_Supported_LandRoverAmbulance + IL_Supported_LandRover + IL_Supported_Hatchback + IL_Supported_UGV + IL_Supported_OFFROAD + IL_Supported_SUV + IL_Supported_GOLF + IL_Supported_WATERSCOOTER + IL_Supported_RHIB;
  912.     IL_Supported_Cargo_NonVeh_Mohawk = IL_Supported_Supply_Crate + IL_Supported_Veh_Ammo + IL_Supported_Barrel + IL_Supported_Tank + IL_Supported_Box_H1 + IL_Supported_Box_H2;
  913.     IL_Supported_Cargo_Mohawk = IL_Supported_Cargo_Veh_Mohawk + IL_Supported_Cargo_NonVeh_Mohawk;
  914.  
  915.     IL_Supported_Cargo_Veh_CHINOOK = IL_Supported_Cargo_Veh_Mohawk;
  916.     IL_Supported_Cargo_NonVeh_CHINOOK = IL_Supported_Cargo_NonVeh_Mohawk;
  917.     IL_Supported_Cargo_CHINOOK = IL_Supported_Cargo_Veh_CHINOOK + IL_Supported_Cargo_NonVeh_CHINOOK;
  918.  
  919.     IL_Supported_Cargo_Veh_V3S = IL_Supported_Cargo_Veh_Kamaz;
  920.     IL_Supported_Cargo_NonVeh_V3S = IL_Supported_Cargo_NonVeh_Kamaz;
  921.     IL_Supported_Cargo_V3S = IL_Supported_Cargo_Veh_V3S + IL_Supported_Cargo_NonVeh_V3S;
  922.  
  923.     IL_Supported_Cargo_Veh_BLACKFISH = IL_Supported_Cargo_Veh_HEMTT + IL_Supported_HEMTT + IL_Supported_KAMAZ + IL_Supported_TEMPEST + IL_Supported_URAL + IL_Supported_V3S + IL_Supported_BRDM2 + IL_Supported_APC;
  924.     IL_Supported_Cargo_NonVeh_BLACKFISH = IL_Supported_Cargo_NonVeh_Mohawk;
  925.     IL_Supported_Cargo_BLACKFISH = IL_Supported_Cargo_Veh_BLACKFISH + IL_Supported_Cargo_NonVeh_BLACKFISH;
  926.  
  927.     IL_Supported_Cargo_Veh_Y32 = IL_Supported_Cargo_Veh_Mohawk;
  928.     IL_Supported_Cargo_NonVeh_Y32 = IL_Supported_Cargo_NonVeh_Mohawk;
  929.     IL_Supported_Cargo_Y32 = IL_Supported_Cargo_Veh_Y32 + IL_Supported_Cargo_NonVeh_Y32;
  930.  
  931.     IL_Supported_Cargo_Veh_HURON = IL_Supported_Cargo_Veh_Mohawk;
  932.     IL_Supported_Cargo_NonVeh_HURON = IL_Supported_Cargo_NonVeh_Mohawk;
  933.     IL_Supported_Cargo_HURON = IL_Supported_Cargo_Veh_HURON + IL_Supported_Cargo_NonVeh_HURON;
  934.  
  935.     IL_Supported_Cargo_NonVeh_HUNTER = IL_Supported_Supply_Crate + IL_Supported_Box_H1 + IL_Supported_Box_H2;
  936.     IL_Supported_Cargo_HUNTER = IL_Supported_Cargo_NonVeh_HUNTER;
  937.  
  938.     IL_Supported_Cargo_NonVeh_IFRIT = IL_Supported_Cargo_NonVeh_HUNTER;
  939.     IL_Supported_Cargo_IFRIT = IL_Supported_Cargo_NonVeh_IFRIT;
  940.  
  941.     IL_Supported_Cargo_NonVeh_STRIDER = IL_Supported_Cargo_NonVeh_HUNTER;
  942.     IL_Supported_Cargo_STRIDER = IL_Supported_Cargo_NonVeh_STRIDER;
  943.  
  944.     IL_Supported_Cargo_Veh_LANDROVER = IL_Supported_Cargo_Veh_Offroad;
  945.     IL_Supported_Cargo_NonVeh_LANDROVER = IL_Supported_Cargo_NonVeh_Kamaz;
  946.     IL_Supported_Cargo_LANDROVER = IL_Supported_Cargo_Veh_LANDROVER + IL_Supported_Cargo_NonVeh_LANDROVER;
  947.  
  948.     IL_Supported_Cargo_Veh_AMBULANCE = IL_Supported_Cargo_Veh_Offroad;
  949.     IL_Supported_Cargo_NonVeh_AMBULANCE = IL_Supported_Cargo_NonVeh_Kamaz;
  950.     IL_Supported_Cargo_AMBULANCE = IL_Supported_Cargo_Veh_AMBULANCE + IL_Supported_Cargo_NonVeh_AMBULANCE;
  951. };
  952.  
  953. if (isnil "IL_Procedures") then
  954. {
  955.     IL_Procedures = true;
  956.  
  957.     IL_Init_Veh =
  958.     {
  959.         private["_obj", "_obj_type", "_force"];
  960.         _obj = _this select 0;
  961.         _force = if (count _this > 1) then {_this select 1} else {false};
  962.         _obj_type = (typeOf _obj);
  963.  
  964.         if ((isNil {_obj getVariable "default_mass"}) || (_force)) then
  965.             {
  966.                 if (isNil {_obj getVariable "default_mass"}) then
  967.                 {
  968.                     _obj setVariable["default_mass", getMass _obj, true];
  969.                 }
  970.                 else
  971.                 {
  972.                     _obj setMass (_obj getVariable "default_mass");
  973.                 };
  974.             };
  975.  
  976.         if (_obj_type in IL_Supported_Vehicles_MOHAWK) then
  977.         {
  978.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  979.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_MOHAWK, true];};
  980.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  981.             if ((isNil {_obj getVariable "can_copilot"}) || (_force)) then {_obj setVariable["can_copilot", IL_Can_CoPilot, true];};
  982.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  983.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -2.25, true];};
  984.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 4.5, true];};
  985.             if ((isNil {_obj getVariable "usable_ramp"}) || (_force)) then {_obj setVariable["usable_ramp", IL_Ramp, true];};
  986.         };
  987.         if (_obj_type in IL_Supported_Vehicles_CHINOOK) then
  988.         {
  989.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  990.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  991.             if ((isNil {_obj getVariable "can_copilot"}) || (_force)) then {_obj setVariable["can_copilot", IL_Can_CoPilot, true];};
  992.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  993.             if (_obj_type == "CH_47F") then
  994.             {
  995.                 if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_CHINOOK - 2, true];};
  996.                 if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -3.1, true];};
  997.                 if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 4.5, true];};
  998.             };
  999.             if (_obj_type == "CH_147F") then
  1000.             {
  1001.                 if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_CHINOOK, true];};
  1002.                 if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -2.55, true];};
  1003.                 if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 5.25, true];};
  1004.             };
  1005.             if (_obj_type in ["kyo_MH47E_HC", "kyo_MH47E_Ramp", "kyo_MH47E_base"]) then
  1006.             {
  1007.                 if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_CHINOOK, true];};
  1008.                 if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -1.5, true];};
  1009.                 if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 6, true];};
  1010.             };
  1011.             if ((isNil {_obj getVariable "usable_ramp"}) || (_force)) then {_obj setVariable["usable_ramp", IL_Ramp, true];};
  1012.         };
  1013.         if (_obj_type in IL_Supported_Vehicles_MH9) then
  1014.         {
  1015.             if ((isNil {_obj getVariable "box_l"}) || (_force)) then {_obj setVariable["box_l", _obj, true];};
  1016.             if ((isNil {_obj getVariable "box_r"}) || (_force)) then {_obj setVariable["box_r", _obj, true];};
  1017.  
  1018.             if ((isNil {_obj getVariable "box_num_l"}) || (_force)) then {_obj setVariable["box_num_l", 0, true];};
  1019.             if ((isNil {_obj getVariable "box_num_r"}) || (_force)) then {_obj setVariable["box_num_r", 0, true];};
  1020.             if ((isNil {_obj getVariable "slots_num_l"}) || (_force)) then {_obj setVariable["slots_num_l", IL_Num_Slots_MH9, true];};
  1021.             if ((isNil {_obj getVariable "slots_num_r"}) || (_force)) then {_obj setVariable["slots_num_r", IL_Num_Slots_MH9, true];};
  1022.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1023.             if ((isNil {_obj getVariable "can_copilot"}) || (_force)) then {_obj setVariable["can_copilot", IL_Can_CoPilot, true];};
  1024.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1025.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.48, true];};
  1026.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 1, true];};
  1027.             if ((isNil {_obj getVariable "usable_ramp"}) || (_force)) then {_obj setVariable["usable_ramp", IL_Ramp, true];};
  1028.         };
  1029.         if (_obj_type in IL_Supported_Vehicles_OFFROAD) then
  1030.         {
  1031.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1032.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_OFFROAD, true];};
  1033.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1034.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1035.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.65, true];};
  1036.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 1.5, true];};
  1037.         };
  1038.         if (_obj_type in IL_Supported_Vehicles_VAN) then
  1039.         {
  1040.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1041.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_VAN, true];};
  1042.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1043.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1044.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.6, true];};
  1045.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 1, true];};
  1046.         };
  1047.         if (_obj_type in IL_Supported_Vehicles_KAMAZ) then
  1048.         {
  1049.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1050.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_KAMAZ, true];};
  1051.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1052.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1053.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.8, true];};
  1054.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", -0.5, true];};
  1055.         };
  1056.         if (_obj_type in IL_Supported_Vehicles_TEMPEST) then
  1057.         {
  1058.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1059.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_TEMPEST, true];};
  1060.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1061.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1062.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.4, true];};
  1063.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 0.5, true];};
  1064.         };
  1065.         if (_obj_type in IL_Supported_Vehicles_HEMTT) then
  1066.         {
  1067.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1068.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_HEMTT, true];};
  1069.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1070.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1071.             if (_obj_type in ["B_Truck_01_box_F", "Marinir_Truck_01_box_FG"]) then
  1072.             {
  1073.                 if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.4, true];};
  1074.                 if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 0.8, true];};
  1075.             }
  1076.             else
  1077.             {
  1078.                 if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.5, true];};
  1079.                 if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 0, true];};
  1080.             };
  1081.         };
  1082.         if (_obj_type in IL_Supported_Vehicles_URAL_COVERED) then
  1083.         {
  1084.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1085.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_URAL_COVERED, true];};
  1086.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1087.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1088.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.5, true];};
  1089.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 0.3, true];};
  1090.         };
  1091.         if (_obj_type in IL_Supported_Vehicles_URAL_OPEN) then
  1092.         {
  1093.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1094.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_URAL_OPEN, true];};
  1095.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1096.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1097.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", 1.5, true];};
  1098.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 0.3, true];};
  1099.         };
  1100.         if (_obj_type in IL_Supported_Vehicles_V3S) then
  1101.         {
  1102.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1103.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_V3S, true];};
  1104.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1105.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1106.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.4, true];};
  1107.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 0., true];};
  1108.         };
  1109.         if (_obj_type in IL_Supported_Vehicles_BLACKFISH) then
  1110.         {
  1111.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1112.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_BLACKFISH, true];};
  1113.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1114.             if ((isNil {_obj getVariable "can_copilot"}) || (_force)) then {_obj setVariable["can_copilot", IL_Can_CoPilot, true];};
  1115.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1116.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -5.75, true];};
  1117.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 7.5, true];};
  1118.             if ((isNil {_obj getVariable "usable_ramp"}) || (_force)) then {_obj setVariable["usable_ramp", IL_Ramp, true];};
  1119.         };
  1120.         if (_obj_type in IL_Supported_Vehicles_Y32) then
  1121.         {
  1122.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1123.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_Y32, true];};
  1124.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1125.             if ((isNil {_obj getVariable "can_copilot"}) || (_force)) then {_obj setVariable["can_copilot", IL_Can_CoPilot, true];};
  1126.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1127.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -2.25, true];};
  1128.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 4.5, true];};
  1129.             if ((isNil {_obj getVariable "usable_ramp"}) || (_force)) then {_obj setVariable["usable_ramp", IL_Ramp, true];};
  1130.         };
  1131.         if (_obj_type in IL_Supported_Vehicles_HURON) then
  1132.         {
  1133.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1134.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_HURON, true];};
  1135.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1136.             if ((isNil {_obj getVariable "can_copilot"}) || (_force)) then {_obj setVariable["can_copilot", IL_Can_CoPilot, true];};
  1137.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1138.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -1.9, true];};
  1139.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 4.2, true];};
  1140.             if ((isNil {_obj getVariable "usable_ramp"}) || (_force)) then {_obj setVariable["usable_ramp", IL_Ramp, true];};
  1141.         };
  1142.         if (_obj_type in IL_Supported_Vehicles_HUNTER) then
  1143.         {
  1144.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1145.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_HUNTER, true];};
  1146.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1147.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1148.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -1, true];};
  1149.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 3.5, true];};
  1150.         };
  1151.         if (_obj_type in IL_Supported_Vehicles_IFRIT) then
  1152.         {
  1153.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1154.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_IFRIT, true];};
  1155.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1156.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1157.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.7, true];};
  1158.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 2.9, true];};
  1159.         };
  1160.         if (_obj_type in IL_Supported_Vehicles_STRIDER) then
  1161.         {
  1162.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1163.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_STRIDER, true];};
  1164.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1165.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1166.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.7, true];};
  1167.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 2.9, true];};
  1168.         };
  1169.         if (_obj_type in IL_Supported_Vehicles_LANDROVER) then
  1170.         {
  1171.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1172.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_LANDROVER, true];};
  1173.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1174.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1175.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.7, true];};
  1176.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 1, true];};
  1177.         };
  1178.         if (_obj_type in IL_Supported_Vehicles_AMBULANCE) then
  1179.         {
  1180.             if ((isNil {_obj getVariable "box_num"}) || (_force)) then {_obj setVariable["box_num", 0, true];};
  1181.             if ((isNil {_obj getVariable "slots_num"}) || (_force)) then {_obj setVariable["slots_num", IL_Num_Slots_AMBULANCE, true];};
  1182.             if ((isNil {_obj getVariable "can_load"}) || (_force)) then {_obj setVariable["can_load", true, true];};
  1183.             if ((isNil {_obj getVariable "can_outside"}) || (_force)) then {_obj setVariable["can_outside", IL_Can_Outside, true];};
  1184.             if ((isNil {_obj getVariable "zload"}) || (_force)) then {_obj setVariable["zload", -0.7, true];};
  1185.             if ((isNil {_obj getVariable "load_offset"}) || (_force)) then {_obj setVariable["load_offset", 0.7, true];};
  1186.         };
  1187.     };
  1188.  
  1189.     IL_Init_Box =
  1190.     {
  1191.         private["_obj", "_obj_type", "_bbr", "_p0", "_p1"];
  1192.         _obj = _this select 0;
  1193.  
  1194.         _obj setVariable["attachedPos", 0, true];
  1195.         _obj setVariable["attachedTruck", _obj, true];
  1196.         _obj setVariable["doors", "N", true];
  1197.  
  1198.         _obj setVariable["slots", 1, true];
  1199.         _obj setVariable["cargo_offset", 0, true];
  1200.  
  1201.         _bbr = boundingBoxReal _obj;
  1202.         _p0 = _bbr select 0;
  1203.         _p1 = _bbr select 1;
  1204.         _obj setVariable["zload_cargo", abs (_p0 select 2), true];
  1205.  
  1206.         _obj_type = (typeOf _obj);
  1207.  
  1208.         if (_obj_type in IL_Supported_Cargo20) then
  1209.         {
  1210.             _obj setVariable["slots", 6, true];
  1211.             _obj setVariable["cargo_offset", 2.6, true];
  1212.             [_obj, 2400] call IL_SetNewMass;
  1213.         };
  1214.         if (_obj_type in IL_Supported_HEMTT) then
  1215.         {
  1216.             _obj setVariable["slots", 10, true];
  1217.             _obj setVariable["cargo_offset", 4.2, true];
  1218.         };
  1219.         if (_obj_type in IL_Supported_Strider) then
  1220.         {
  1221.             _obj setVariable["slots", 6, true];
  1222.             _obj setVariable["cargo_offset", 2.2, true];
  1223.         };
  1224.         if (_obj_type in IL_Supported_TaruPods) then
  1225.         {
  1226.             _obj setVariable["slots", 7, true];
  1227.             _obj setVariable["cargo_offset", 2.9, true];
  1228.         };
  1229.         if (_obj_type in IL_Supported_Hunter) then
  1230.         {
  1231.             _obj setVariable["slots", 7, true];
  1232.             _obj setVariable["cargo_offset", 1.5, true];
  1233.         };
  1234.         if (_obj_type in IL_Supported_Ifrit) then
  1235.         {
  1236.             _obj setVariable["slots", 7, true];
  1237.             _obj setVariable["cargo_offset", 1.3, true];
  1238.         };
  1239.         if (_obj_type in IL_Supported_VAN) then
  1240.         {
  1241.             _obj setVariable["slots", 6, true];
  1242.             _obj setVariable["cargo_offset", 1.8, true];
  1243.         };
  1244.         if (_obj_type in IL_Supported_UGV) then
  1245.         {
  1246.             _obj setVariable["slots", 5, true];
  1247.             _obj setVariable["cargo_offset", 2.1, true];
  1248.         };
  1249.         if (_obj_type in IL_Supported_Hatchback) then
  1250.         {
  1251.             _obj setVariable["slots", 5, true];
  1252.             _obj setVariable["cargo_offset", 1.9, true];
  1253.         };
  1254.         if (_obj_type in IL_Supported_SUV) then
  1255.         {
  1256.             _obj setVariable["slots", 6, true];
  1257.             _obj setVariable["cargo_offset", 2, true];
  1258.         };
  1259.         if (_obj_type in IL_Supported_OFFROAD) then
  1260.         {
  1261.             _obj setVariable["slots", 6, true];
  1262.             _obj setVariable["cargo_offset", 2.4, true];
  1263.         };
  1264.         if (_obj_type in IL_Supported_Rubberboat) then
  1265.         {
  1266.             _obj setVariable["slots", 5, true];
  1267.             _obj setVariable["cargo_offset", 2, true];
  1268.         };
  1269.         if (_obj_type in IL_Supported_SDV) then
  1270.         {
  1271.             _obj setVariable["slots", 6, true];
  1272.             _obj setVariable["cargo_offset", 1.6, true];
  1273.         };
  1274.         if (_obj_type in IL_Supported_Quadbike) then
  1275.         {
  1276.             _obj setVariable["slots", 2, true];
  1277.             _obj setVariable["cargo_offset", 0.5, true];
  1278.         };
  1279.         if (_obj_type in IL_Supported_Karts) then
  1280.         {
  1281.             _obj setVariable["slots", 2, true];
  1282.             _obj setVariable["cargo_offset", 0.5, true];
  1283.         };
  1284.         if (_obj_type in IL_Supported_Veh_Ammo) then
  1285.         {
  1286.             _obj setVariable["slots", 2, true];
  1287.             _obj setVariable["cargo_offset", 0.4, true];
  1288.         };
  1289.         if (_obj_type in IL_Supported_Tank) then
  1290.         {
  1291.             if (_obj_type == "Land_WaterTank_F") then
  1292.             {
  1293.                 _obj setVariable["slots", 3, true];
  1294.                 _obj setVariable["cargo_offset", 1, true];
  1295.             }
  1296.             else
  1297.             {
  1298.                 _obj setVariable["slots", 2, true];
  1299.                 _obj setVariable["cargo_offset", 0.4, true];
  1300.             };
  1301.             _turn = true;
  1302.         };
  1303.         if (_obj_type in IL_Supported_Volha) then
  1304.         {
  1305.             _obj setVariable["slots", 4, true];
  1306.             _obj setVariable["cargo_offset", 1.2, true];
  1307.         };
  1308.         if (_obj_type in IL_Supported_Lada) then
  1309.         {
  1310.             _obj setVariable["slots", 4, true];
  1311.             _obj setVariable["cargo_offset", 1.2, true];
  1312.         };
  1313.         if (_obj_type in IL_Supported_UAZ) then
  1314.         {
  1315.             _obj setVariable["slots", 3, true];
  1316.             _obj setVariable["cargo_offset", 1.2, true];
  1317.         };
  1318.             if (_obj_type in IL_Supported_Octavius) then
  1319.         {
  1320.             _obj setVariable["slots", 5, true];
  1321.             _obj setVariable["cargo_offset", 1.7, true];
  1322.         };
  1323.             if (_obj_type in IL_Supported_Tractor) then
  1324.         {
  1325.             _obj setVariable["slots", 4, true];
  1326.             _obj setVariable["cargo_offset", 1.7, true];
  1327.         };
  1328.             if (_obj_type in IL_Supported_OldTractor) then
  1329.         {
  1330.             _obj setVariable["slots", 4, true];
  1331.             _obj setVariable["cargo_offset", 1.0, true];
  1332.         };
  1333.         if (_obj_type in IL_Supported_TowTractor) then
  1334.         {
  1335.             _obj setVariable["slots", 2, true];
  1336.             _obj setVariable["cargo_offset", 0.5, true];
  1337.         };
  1338.         if (_obj_type in IL_Supported_LandRover) then
  1339.         {
  1340.             _obj setVariable["slots", 4, true];
  1341.             _obj setVariable["cargo_offset", 1.7, true];
  1342.         };
  1343.         if (_obj_type in IL_Supported_LandRoverAmbulance) then
  1344.         {
  1345.             _obj setVariable["slots", 4, true];
  1346.             _obj setVariable["cargo_offset", 1.7, true];
  1347.         };
  1348.         if (_obj_type in IL_Supported_Motorboat) then
  1349.         {
  1350.             _obj setVariable["slots", 6, true];
  1351.             _obj setVariable["cargo_offset", 2, true];
  1352.         };
  1353.         if (_obj_type in IL_Supported_APC) then
  1354.         {
  1355.             _obj setVariable["slots", 10, true];
  1356.             _obj setVariable["cargo_offset", 4.2, true];
  1357.         };
  1358.         if (_obj_type in IL_Supported_GOLF) then
  1359.         {
  1360.             _obj setVariable["slots", 3, true];
  1361.             _obj setVariable["cargo_offset", 1.2, true];
  1362.         };
  1363.         if (_obj_type in IL_Supported_BTR40) then
  1364.         {
  1365.             _obj setVariable["slots", 7, true];
  1366.             _obj setVariable["cargo_offset", 4, true];
  1367.         };
  1368.         if (_obj_type in IL_Supported_HMMWV) then
  1369.         {
  1370.             _obj setVariable["slots", 7, true];
  1371.             _obj setVariable["cargo_offset", 1.8, true];
  1372.         };
  1373.         if (_obj_type in IL_Supported_BRDM2) then
  1374.         {
  1375.             _obj setVariable["slots", 10, true];
  1376.             _obj setVariable["cargo_offset", 1.2, true];
  1377.         };
  1378.         if (_obj_type in IL_Supported_V3S) then
  1379.         {
  1380.             _obj setVariable["slots", 10, true];
  1381.             _obj setVariable["cargo_offset", 4.2, true];
  1382.         };
  1383.         if (_obj_type in IL_Supported_WATERSCOOTER) then
  1384.         {
  1385.             _obj setVariable["slots", 2, true];
  1386.             _obj setVariable["cargo_offset", 0.5, true];
  1387.         };
  1388.         if (_obj_type in IL_Supported_RHIB) then
  1389.         {
  1390.             _obj setVariable["slots", 6, true];
  1391.             _obj setVariable["cargo_offset", 2, true];
  1392.         };
  1393.         if (_obj_type in IL_Supported_MB4WD) then
  1394.         {
  1395.             _obj setVariable["slots", 3, true];
  1396.             _obj setVariable["cargo_offset", 1.7, true];
  1397.         };
  1398.         if (_obj_type in IL_Supported_PROWLER) then
  1399.         {
  1400.             _obj setVariable["slots", 7, true];
  1401.             _obj setVariable["cargo_offset", 1.3, true];
  1402.         };
  1403.         if (_obj_type in IL_Supported_QILIN) then
  1404.         {
  1405.             _obj setVariable["slots", 7, true];
  1406.             _obj setVariable["cargo_offset", 1.2, true];
  1407.         };
  1408.     };
  1409.  
  1410.     IL_Server_AddScore =
  1411.     {
  1412.         if (isServer) then
  1413.         {
  1414.             ((_this select 1) select 0) addScore ((_this select 1) select 1);
  1415.         };
  1416.     };
  1417.  
  1418.     "IL_SetScore" addPublicVariableEventHandler IL_Server_AddScore;
  1419.  
  1420.     IL_Score =
  1421.     {
  1422.         private ["_obj", "_score"];
  1423.  
  1424.         _obj = _this select 0;
  1425.         _score = _this select 1;
  1426.  
  1427.         if (_score != 0) then
  1428.         {
  1429.             IL_SetScore = [_obj, _score];
  1430.             if (isServer) then
  1431.             {
  1432.                 ["Cos", IL_SetScore] spawn IL_Server_AddScore;
  1433.             }
  1434.             else
  1435.             {
  1436.                 publicVariableServer "IL_SetScore";
  1437.             };
  1438.         };
  1439.     };
  1440.  
  1441.     IL_Server_SetDir =
  1442.     {
  1443.         private ["_obj", "_dir"];
  1444.         _obj = _this select 1 select 0;
  1445.         _dir = _this select 1 select 1;
  1446.  
  1447.         if (_dir < 0) then
  1448.         {
  1449.             _dir = _dir + 360;
  1450.         };
  1451.         if (_dir > 360) then
  1452.         {
  1453.             _dir = _dir - 360;
  1454.         };
  1455.  
  1456.         _obj setDir _dir;
  1457.         _obj setPos (getPos _obj);
  1458.     };
  1459.  
  1460.     "IL_SetDir" addPublicVariableEventHandler IL_Server_SetDir;
  1461.  
  1462.     IL_Rotate =
  1463.     {
  1464.         private ["_obj", "_to", "_change"];
  1465.  
  1466.         _obj = _this select 0;
  1467.         _to = _this select 1;
  1468.         _change = _this select 2;
  1469.  
  1470.         _change = (getDir _obj + _change) - getDir _to;
  1471.  
  1472.         IL_SetDir = [_obj, _change];
  1473.         if (local _obj) then
  1474.         {
  1475.             ["Cos", IL_SetDir] spawn IL_Server_SetDir;
  1476.         }
  1477.         else
  1478.         {
  1479.             if (isDedicated) then
  1480.             {
  1481.                 (owner _obj) publicVariableClient "IL_SetDir";
  1482.             }
  1483.             else
  1484.             {
  1485.                 publicVariableServer "IL_SetDir";
  1486.             };
  1487.         };
  1488.     };
  1489.  
  1490.     IL_Server_SetMass =
  1491.     {
  1492.         private ["_obj", "_mass"];
  1493.         _obj = _this select 1 select 0;
  1494.         _mass = _this select 1 select 1;
  1495.         if ((getMass _obj) != _mass) then
  1496.         {
  1497.             _obj setMass _mass;
  1498.         };
  1499.     };
  1500.  
  1501.     "IL_SetMass" addPublicVariableEventHandler IL_Server_SetMass;
  1502.  
  1503.     IL_GetCargoMass =
  1504.     {
  1505.         private ["_v", "_cargo_mass"];
  1506.         _v = _this select 0;
  1507.         _cargo_mass = 0;
  1508.         if (count(attachedObjects _v) > 0) then
  1509.         {
  1510.             {
  1511.                 _cargo_mass = _cargo_mass + getMass _x;
  1512.             } forEach attachedObjects _v;
  1513.         };
  1514.         _cargo_mass;
  1515.     };
  1516.  
  1517.     IL_GetDefaultMass =
  1518.     {
  1519.         private ["_v"];
  1520.         _v = _this select 0;
  1521.         _v getVariable "default_mass";
  1522.     };
  1523.  
  1524.     IL_SetNewMass =
  1525.     {
  1526.         if !(IL_Mass) ExitWith {};
  1527.         private ["_v", "_v_def_mass", "_cargo_mass"];
  1528.         _v = _this select 0;
  1529.         _v_def_mass =  if (count _this > 1) then {_this select 1} else {0};
  1530.         _cargo_mass =  if (count _this > 2) then {_this select 2} else {0};
  1531.  
  1532.         if (_v_def_mass == 0) then
  1533.         {
  1534.             _v_def_mass = [_v] call IL_GetDefaultMass;
  1535.         };
  1536.         if (_cargo_mass == 0) then
  1537.         {
  1538.             _cargo_mass = [_v] call IL_GetCargoMass;
  1539.         };
  1540.  
  1541.         if ((getMass _v) != (_v_def_mass + _cargo_mass)) then
  1542.         {
  1543.             IL_SetMass = [_v, (_v_def_mass + _cargo_mass)];
  1544.             if (local _v) then
  1545.             {
  1546.                 ["Cos", IL_SetMass] spawn IL_Server_SetMass;
  1547.             }
  1548.             else
  1549.             {
  1550.                 if (isDedicated) then
  1551.                 {
  1552.                     (owner _v) publicVariableClient "IL_SetMass";
  1553.                 }
  1554.                 else
  1555.                 {
  1556.                     publicVariableServer "IL_SetMass";
  1557.                 };
  1558.             };
  1559.         };
  1560.     };
  1561.  
  1562.     IL_Move_Attach=
  1563.     {
  1564.         private ["_veh", "_obj", "_from", "_to", "_pos", "_step", "_steps", "_from_x", "_from_y", "_from_z", "_to_x", "_to_y", "_to_z", "_x", "_y", "_z", "_i", "_x_step", "_y_step", "_z_step", "_turn"];
  1565.         _veh = _this select 0;
  1566.         _obj = _this select 1;
  1567.         _from = _this select 2;
  1568.         _to = _this select 3;
  1569.         _step = _this select 4;
  1570.         _turn = if (count _this > 5) then {_this select 5} else {false};
  1571.  
  1572.         _from_x = _from select 0;
  1573.         _from_y = _from select 1;
  1574.         _from_z = _from select 2;
  1575.  
  1576.         _to_x = _to select 0;
  1577.         _to_y = _to select 1;
  1578.         _to_z = _to select 2;
  1579.  
  1580.         _x = _to_x - _from_x;
  1581.         _y = _to_y - _from_y;
  1582.         _z = _to_z - _from_z;
  1583.  
  1584.         if (((abs _x) > (abs _y)) && ((abs _x) > (abs _z))) then
  1585.         {
  1586.             _steps = round ((abs _x) / _step);
  1587.         }
  1588.         else
  1589.         {
  1590.             if ((abs _y) > (abs _z)) then
  1591.             {
  1592.                 _steps = round ((abs _y) / _step);
  1593.             }
  1594.             else
  1595.             {
  1596.                 _steps = round ((abs _z) / _step);
  1597.  
  1598.             };
  1599.         };
  1600.  
  1601.         _i = 0;
  1602.         _obj AttachTo [_veh, _from];
  1603.         while {_i < _steps} do
  1604.         {
  1605.             _i = _i + 1;
  1606.             _pos = [(((_x / _steps) * _i) + _from_x), (((_y / _steps) * _i) + _from_y), (((_z / _steps) * _i) + _from_z)];
  1607.             _obj AttachTo [_veh, _pos];
  1608.             if (_turn) then
  1609.             {
  1610.                 [_obj, _veh, -90] call IL_Rotate;
  1611.                 _turn = false;
  1612.             };
  1613.             sleep 0.25;
  1614.         };
  1615.  
  1616.         _obj AttachTo [_veh, _to];
  1617.     };
  1618.  
  1619.     IL_Create_And_Attach =
  1620.     {
  1621.         _type = _this select 0;
  1622.         _to = _this select 1;
  1623.         _x = if (count _this > 2) then {_this select 2} else {0};
  1624.         _y = if (count _this > 3) then {_this select 3} else {0};
  1625.         _z = if (count _this > 4) then {_this select 4} else {0};
  1626.         _m = createVehicle [_type, position _to, [], 0, "CAN_COLLIDE"];
  1627.         _m AttachTo [_to,[_x,_y,_z]];
  1628.         _m
  1629.     };
  1630.  
  1631.     IL_Server_Cargo_Para =
  1632.     {
  1633.         private ["_smoke", "_player_velocity", "_light", "_damage", "_smoke_type", "_chemlight_type", "_cargo_pos", "_last_attach_pos", "_dist", "_velocity", "_tmp"];
  1634.         _vars = _this select 1;
  1635.         _cargo = _vars select 0;
  1636.         _v = _vars select 1;
  1637.         _last_attach_pos = _vars select 2;
  1638.         _player_velocity = _vars select 3;
  1639.         if (((IL_Para_Smoke) || (IL_Para_Smoke_Add)) && (_cargo isKindOf "AllVehicles")) then
  1640.         {
  1641.             _smoke_type = IL_Para_Smoke_Veh;
  1642.         }
  1643.         else
  1644.         {
  1645.             _smoke_type = IL_Para_Smoke_Default;
  1646.         };
  1647.         if (((IL_Para_Light) || (IL_Para_Light_Add)) && (_cargo isKindOf "AllVehicles")) then
  1648.         {
  1649.             _chemlight_type = IL_Para_Light_Veh;
  1650.         }
  1651.         else
  1652.         {
  1653.             _chemlight_type = IL_Para_Light_Default;
  1654.         };
  1655.  
  1656.         _cargo_pos = [0,0,-2.3];
  1657.  
  1658.         _damage = getDammage _cargo;
  1659.         detach _cargo;
  1660.         _cargo setVelocity _player_velocity;
  1661.         _dist = _v distance _cargo;
  1662.         _tmp = [_cargo] spawn
  1663.         {
  1664.             while {(getPosATL (_this select 0)) select 2 > IL_Para_Drop_Open_ATL} do
  1665.             {
  1666.                 sleep 0.2;
  1667.             };
  1668.         };
  1669.         while {(_v distance _cargo) - _dist < 20} do
  1670.         {
  1671.             sleep 0.2;
  1672.         };
  1673.         if (IL_Para_Drop_Open_ATL > 0) then
  1674.         {
  1675.             while {(getPosATL _cargo) select 2 > (IL_Para_Drop_Open_ATL + ((velocity _cargo) select 2) * -0.5)} do
  1676.             {
  1677.                 sleep 0.2;
  1678.             };
  1679.         };
  1680.  
  1681.         _chute = createVehicle ["B_Parachute_02_F", position _cargo, [], 0, "CAN_COLLIDE"];
  1682.         _chute attachTo [_cargo, _cargo_pos];
  1683.         detach _chute;
  1684.  
  1685.         if (IL_Para_Drop_Velocity) then
  1686.         {
  1687.             _chute setVelocity _player_velocity;
  1688.         };
  1689.         _cargo attachTo [_chute, _cargo_pos];
  1690.  
  1691.         if (IL_Para_Smoke) then
  1692.         {
  1693.             _smoke = [_smoke_type, _cargo] call IL_Create_And_Attach;
  1694.         };
  1695.         if (IL_Para_Light) then
  1696.         {
  1697.             _light = [_chemlight_type, _cargo] call IL_Create_And_Attach;
  1698.         };
  1699.         while {(getPos _cargo) select 2 > 2} do
  1700.         {
  1701.             sleep 0.2;
  1702.         };
  1703.         detach _cargo;
  1704.         if (IL_Para_Smoke) then
  1705.         {
  1706.             _smoke attachTo [_cargo,[0,0,2]];
  1707.             detach _smoke;
  1708.         };
  1709.         if (IL_Para_Light) then
  1710.         {
  1711.             _light attachTo [_cargo,[0,0,2]];
  1712.             detach _light;
  1713.         };
  1714.         if (IL_Para_Smoke_Add) then
  1715.         {
  1716.             _smoke = [_smoke_type, _cargo] call IL_Create_And_Attach;
  1717.             _smoke attachTo [_cargo,[0,0,2]];
  1718.             detach _smoke;
  1719.         };
  1720.         if (IL_Para_Light_Add) then
  1721.         {
  1722.             _light = [_chemlight_type, _cargo] call IL_Create_And_Attach;
  1723.             _light attachTo [_cargo,[0,0,2]];
  1724.             detach _light;
  1725.         };
  1726.  
  1727.         _cargo setPosASL getPosASL _cargo;
  1728.  
  1729.         if (IL_CDamage == 0) then
  1730.         {
  1731.             _cargo setDamage 0;
  1732.         };
  1733.  
  1734.         if (IL_CDamage == 1) then
  1735.         {
  1736.             _cargo setDamage _damage;
  1737.             if (_damage != (getDammage _cargo)) then
  1738.             {
  1739.                 sleep 1;
  1740.                 _cargo setDamage _damage;
  1741.             };
  1742.         };
  1743.     };
  1744.  
  1745.     IL_Cargo_Para = {
  1746.         IL_CLient_Cargo_Para = _this;
  1747.         if (isServer) then
  1748.         {
  1749.             IL_CLient_Cargo_Para spawn IL_Server_Cargo_Para;
  1750.         }
  1751.         else
  1752.         {
  1753.             [Player, IL_Unload_Score] call IL_Score;
  1754.             publicVariableServer "IL_Client_Cargo_Para";
  1755.         };
  1756.     };
  1757.     "IL_Client_Cargo_Para" addPublicVariableEventHandler IL_Cargo_Para;
  1758.  
  1759.     IL_Do_Load =
  1760.     {
  1761.         private["_NoBoxHint", "_v", "_supported_cargo", "_zload", "_x_cargo_offset", "_cargo_offset", "_sdist", "_spoint", "_slot_num", "_counter", "_done", "_obj_lst", "_damage", "_obj_type", "_doors", "_box_num", "_dummy", "_nic", "_turn", "_force", "_cargo"];
  1762.         _NoBoxHint = "The box is in the vicinity. Perhaps it is outside of the loading area.";
  1763.         _v = _this select 0;
  1764.         _supported_cargo = _this select 1;
  1765.         _doors = if (count _this > 2) then {_this select 2} else {"B"};
  1766.         _force = if (count _this > 3) then {_this select 3} else {false};
  1767.         _cargo = if (count _this > 4) then {_this select 4} else {ObjNull};
  1768.  
  1769.         _v setVariable["can_load", false, true];
  1770.         _zload = _v getVariable "zload";
  1771.         _obj_type = (typeOf _v);
  1772.         _sdist = 0;
  1773.  
  1774.         _counter = 0;
  1775.         _done = false;
  1776.         _turn = false;
  1777.  
  1778.         if ((_obj_type in IL_Supported_Vehicles_VAN) && (_doors == "B")) then
  1779.         {
  1780.             _sdist = IL_SDistL;
  1781.             _spoint = _v modelToWorld [0,-4.5,-1.6];
  1782.             _box_num = _v getVariable "box_num";
  1783.             _slot_num = _v getVariable "slots_num";
  1784.         };
  1785.         if ((_obj_type in IL_Supported_Vehicles_OFFROAD) && (_doors == "B")) then
  1786.         {
  1787.             _sdist = IL_SDistL;
  1788.             _spoint = _v modelToWorld [0,-4.5,-1.6];
  1789.             _box_num = _v getVariable "box_num";
  1790.             _slot_num = _v getVariable "slots_num";
  1791.         };
  1792.         if ((_obj_type in IL_Supported_Vehicles_KAMAZ) && (_doors == "B")) then
  1793.         {
  1794.             _sdist = IL_SDistL;
  1795.             _spoint = _v modelToWorld [0,-6 - (_v getVariable "load_offset"),0];
  1796.             _box_num = _v getVariable "box_num";
  1797.             _slot_num = _v getVariable "slots_num";
  1798.         };
  1799.         if ((_obj_type in IL_Supported_Vehicles_HEMTT) && (_doors == "B")) then
  1800.         {
  1801.             _sdist = IL_SDistL;
  1802.             _spoint = _v modelToWorld [0,-7 - (_v getVariable "load_offset"),0];
  1803.             _box_num = _v getVariable "box_num";
  1804.             _slot_num = _v getVariable "slots_num";
  1805.         };
  1806.         if ((_obj_type in IL_Supported_Vehicles_URAL_COVERED) && (_doors == "B")) then
  1807.         {
  1808.             _sdist = IL_SDistL;
  1809.             _spoint = _v modelToWorld [0,-6 - (_v getVariable "load_offset"),0];
  1810.             _box_num = _v getVariable "box_num";
  1811.             _slot_num = _v getVariable "slots_num";
  1812.         };
  1813.         if ((_obj_type in IL_Supported_Vehicles_URAL_OPEN) && (_doors == "B")) then
  1814.         {
  1815.             _sdist = IL_SDistL;
  1816.             _spoint = _v modelToWorld [0,-6 - (_v getVariable "load_offset"),0];
  1817.             _box_num = _v getVariable "box_num";
  1818.             _slot_num = _v getVariable "slots_num";
  1819.         };
  1820.         if ((_obj_type in IL_Supported_Vehicles_TEMPEST) && (_doors == "B")) then
  1821.         {
  1822.             _sdist = IL_SDistL;
  1823.             _spoint = _v modelToWorld [0,-6.5 - (_v getVariable "load_offset"),0];
  1824.             _box_num = _v getVariable "box_num";
  1825.             _slot_num = _v getVariable "slots_num";
  1826.         };
  1827.         if ((_obj_type in IL_Supported_Vehicles_CHINOOK) && (_doors == "B")) then
  1828.         {
  1829.             _sdist = IL_SDistL + IL_SDistL_Heli_offset;
  1830.             _spoint = _v modelToWorld [0,-9,-3];
  1831.             _box_num = _v getVariable "box_num";
  1832.             _slot_num = _v getVariable "slots_num";
  1833.         };
  1834.         if ((_obj_type in IL_Supported_Vehicles_MOHAWK) && (_doors == "B")) then
  1835.         {
  1836.             _sdist = IL_SDistL + IL_SDistL_Heli_offset;
  1837.             _spoint = _v modelToWorld [0,-6,-3];
  1838.             _box_num = _v getVariable "box_num";
  1839.             _slot_num = _v getVariable "slots_num";
  1840.         };
  1841.         if ((_obj_type in IL_Supported_Vehicles_MH9) && (_doors == "L")) then
  1842.         {
  1843.             _sdist = IL_SDistL + IL_SDistL_Heli_offset;
  1844.             _spoint = _v modelToWorld [0-3,1.3,-1.3];
  1845.             _box_num = _v getVariable "box_num_l";
  1846.             _slot_num = _v getVariable "slots_num_l";
  1847.         };
  1848.         if ((_obj_type in IL_Supported_Vehicles_MH9) && (_doors == "R")) then
  1849.         {
  1850.             _sdist = IL_SDistL + IL_SDistL_Heli_offset;
  1851.             _spoint = _v modelToWorld [0+3,1.3,-1.3];
  1852.             _box_num = _v getVariable "box_num_r";
  1853.             _slot_num = _v getVariable "slots_num_r";
  1854.         };
  1855.         if ((_obj_type in IL_Supported_Vehicles_V3S) && (_doors == "B")) then
  1856.         {
  1857.             _sdist = IL_SDistL;
  1858.             _spoint = _v modelToWorld [0,-6.5 - (_v getVariable "load_offset"),0];
  1859.             _box_num = _v getVariable "box_num";
  1860.             _slot_num = _v getVariable "slots_num";
  1861.         };
  1862.         if ((_obj_type in IL_Supported_Vehicles_BLACKFISH) && (_doors == "B")) then
  1863.         {
  1864.             _sdist = IL_SDistL + IL_SDistL_Heli_offset;
  1865.             _spoint = _v modelToWorld [0,-9,-5.4];
  1866.             _box_num = _v getVariable "box_num";
  1867.             _slot_num = _v getVariable "slots_num";
  1868.         };
  1869.         if ((_obj_type in IL_Supported_Vehicles_Y32) && (_doors == "B")) then
  1870.         {
  1871.             _sdist = IL_SDistL + IL_SDistL_Heli_offset;
  1872.             _spoint = _v modelToWorld [0,-6.5,-2.5];
  1873.             _box_num = _v getVariable "box_num";
  1874.             _slot_num = _v getVariable "slots_num";
  1875.         };
  1876.         if ((_obj_type in IL_Supported_Vehicles_HURON) && (_doors == "B")) then
  1877.         {
  1878.             _sdist = IL_SDistL + IL_SDistL_Heli_offset;
  1879.             _spoint = _v modelToWorld [0,-9,-4.5];
  1880.             _box_num = _v getVariable "box_num";
  1881.             _slot_num = _v getVariable "slots_num";
  1882.         };
  1883.         if ((_obj_type in IL_Supported_Vehicles_HUNTER) && (_doors == "B")) then
  1884.         {
  1885.             _sdist = IL_SDistL;
  1886.             _spoint = _v modelToWorld [0,-4.5,-1.6];
  1887.             _box_num = _v getVariable "box_num";
  1888.             _slot_num = _v getVariable "slots_num";
  1889.         };
  1890.         if ((_obj_type in IL_Supported_Vehicles_IFRIT) && (_doors == "B")) then
  1891.         {
  1892.             _sdist = IL_SDistL;
  1893.             _spoint = _v modelToWorld [0,-4.5,-1.6];
  1894.             _box_num = _v getVariable "box_num";
  1895.             _slot_num = _v getVariable "slots_num";
  1896.         };
  1897.         if ((_obj_type in IL_Supported_Vehicles_STRIDER) && (_doors == "B")) then
  1898.         {
  1899.             _sdist = IL_SDistL;
  1900.             _spoint = _v modelToWorld [0,-4.5,-1.6];
  1901.             _box_num = _v getVariable "box_num";
  1902.             _slot_num = _v getVariable "slots_num";
  1903.         };
  1904.         if ((_obj_type in IL_Supported_Vehicles_LANDROVER) && (_doors == "B")) then
  1905.         {
  1906.             _sdist = IL_SDistL;
  1907.             _spoint = _v modelToWorld [0,-4.5,-1.6];
  1908.             _box_num = _v getVariable "box_num";
  1909.             _slot_num = _v getVariable "slots_num";
  1910.         };
  1911.         if ((_obj_type in IL_Supported_Vehicles_AMBULANCE) && (_doors == "B")) then
  1912.         {
  1913.             _sdist = IL_SDistL;
  1914.             _spoint = _v modelToWorld [0,-4.5,-1.6];
  1915.             _box_num = _v getVariable "box_num";
  1916.             _slot_num = _v getVariable "slots_num";
  1917.         };
  1918.  
  1919.         if !(_force) then
  1920.         {
  1921.             _obj_lst = nearestObjects[ _spoint, _supported_cargo, _sdist];
  1922.         }
  1923.         else
  1924.         {
  1925.             _obj_lst = [_cargo];
  1926.         };
  1927.  
  1928.         if (count (_obj_lst) > 0) then
  1929.         {
  1930.             {
  1931.                 if (isNil {_x getVariable "attachedPos"}) then
  1932.                 {
  1933.                     [_x] call IL_Init_Box;
  1934.                 };
  1935.                 if ((typeOf _x) in (IL_Supported_Cargo20 + ["Land_WaterTank_F"])) then
  1936.                 {
  1937.                     _turn = true;
  1938.                 };
  1939.  
  1940.  
  1941.                 _lock1 = locked _v;
  1942.                 _lock2 = locked _x;
  1943.                 if (_lock1 <= 1) then
  1944.                 {
  1945.                     if (_lock2 <= 1) then
  1946.                     {
  1947.                         if (_obj_type in IL_Supported_Vehicles_MH9) then
  1948.                         {
  1949.                         _turn = !_turn;
  1950.                         };
  1951.                         if ((_box_num > _slot_num) && !_done) then
  1952.                         {
  1953.                         _done = true;
  1954.                         _counter = (_box_num);
  1955.                         _zload = (_v getVariable "zload") + (_x getVariable "zload_cargo");
  1956.                         _cargo_offset = (_v getVariable "load_offset") + (_x getVariable "cargo_offset");
  1957.                         if ((typeOf _x) in IL_Supported_UGV) then
  1958.                         {
  1959.                             _x_cargo_offset = -0.4;
  1960.                         }
  1961.                         else
  1962.                         {
  1963.                             _x_cargo_offset = 0;
  1964.                         };
  1965.                         _damage = getDammage _x;
  1966.  
  1967.                         if ((typeOf _x) in IL_Supported_SDV) then
  1968.                         {
  1969.                             _x animate ["periscope", 3];
  1970.                             _x animate ["Antenna", 3];
  1971.                             _x animate ["HideScope", 3];
  1972.                             _x animate["display_on_R", 1];
  1973.                             while {_x animationPhase "periscope" < 3} do
  1974.                             {
  1975.                                 sleep 1;
  1976.                             };
  1977.                         };
  1978.  
  1979.                         if ((_obj_type in IL_Supported_Vehicles_VAN) && (_doors == "B")) then
  1980.                         {
  1981.                             [_v, _x, [_x_cargo_offset,-4.5,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  1982.                         };
  1983.                         if ((_obj_type in IL_Supported_Vehicles_OFFROAD) && (_doors == "B")) then
  1984.                         {
  1985.                             [_v, _x, [_x_cargo_offset,-4.5,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  1986.                         };
  1987.                         if ((_obj_type in IL_Supported_Vehicles_KAMAZ) && (_doors == "B")) then
  1988.                         {
  1989.                             [_v, _x, [_x_cargo_offset,-6 - _cargo_offset,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  1990.                         };
  1991.                         if ((_obj_type in IL_Supported_Vehicles_HEMTT) && (_doors == "B")) then
  1992.                         {
  1993.                             [_v, _x, [_x_cargo_offset,-7 - _cargo_offset,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  1994.                         };
  1995.                         if ((_obj_type in IL_Supported_Vehicles_URAL_COVERED) && (_doors == "B")) then
  1996.                         {
  1997.                             [_v, _x, [_x_cargo_offset,-5,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  1998.                         };
  1999.                         if ((_obj_type in IL_Supported_Vehicles_URAL_OPEN) && (_doors == "B")) then
  2000.                         {
  2001.                             [_v, _x, [_x_cargo_offset,-5,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2002.                         };
  2003.                         if ((_obj_type in IL_Supported_Vehicles_TEMPEST) && (_doors == "B")) then
  2004.                         {
  2005.                             [_v, _x, [_x_cargo_offset,-6.5 - _cargo_offset,_zload], [_x_cargo_offset,_counter - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2006.                         };
  2007.                         if ((_obj_type in IL_Supported_Vehicles_CHINOOK)  && (_doors == "B")) then
  2008.                         {
  2009.                             [_v, _x, [_x_cargo_offset,-9,-0.75 + _zload], [_x_cargo_offset,-7,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2010.                             [_v, _x, [_x_cargo_offset,-7,-0.75 + _zload], [_x_cargo_offset,-4,_zload], 1, _turn] call IL_Move_Attach;
  2011.                             [_v, _x, [_x_cargo_offset,-4,_zload], [_x_cargo_offset,_counter + 9 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2012.                         };
  2013.                         if ((_obj_type in IL_Supported_Vehicles_MOHAWK)  && (_doors == "B")) then
  2014.                         {
  2015.                             [_v, _x, [_x_cargo_offset,-6,-0.75 + _zload], [_x_cargo_offset,-4.5,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2016.                             [_v, _x, [_x_cargo_offset,-4.5,-0.75 + _zload], [_x_cargo_offset,-1.5,_zload], 1, _turn] call IL_Move_Attach;
  2017.                             [_v, _x, [_x_cargo_offset,-1.5,_zload], [_x_cargo_offset,_counter + 9 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2018.                         };
  2019.                         if ((_obj_type in IL_Supported_Vehicles_MH9)  && (_doors == "L")) then
  2020.                         {
  2021.                             [_v, _x, [_x_cargo_offset-3,1.3,-1.3 + _zload], [_x_cargo_offset-1,-0.2,_zload], 1, _turn] call IL_Move_Attach;
  2022.                         };
  2023.                         if ((_obj_type in IL_Supported_Vehicles_MH9)  && (_doors == "R")) then
  2024.                         {
  2025.                             [_v, _x, [_x_cargo_offset+3,1.3,-1.3 + _zload], [_x_cargo_offset+1,-0.2,_zload], 1, _turn] call IL_Move_Attach;
  2026.                         };
  2027.                         if ((_obj_type in IL_Supported_Vehicles_V3S) && (_doors == "B")) then
  2028.                         {
  2029.                             [_v, _x, [_x_cargo_offset,-6.5 - _cargo_offset,_zload], [_x_cargo_offset,_counter - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2030.                         };
  2031.                         if ((_obj_type in IL_Supported_Vehicles_BLACKFISH)  && (_doors == "B")) then
  2032.                         {
  2033.                             [_v, _x, [_x_cargo_offset,-9,-0.93 + _zload], [_x_cargo_offset,-8,-0.93 + _zload], 1, _turn] call IL_Move_Attach;
  2034.                             [_v, _x, [_x_cargo_offset,-7,-0.93 + _zload], [_x_cargo_offset,-3.5,_zload], 1, _turn] call IL_Move_Attach;
  2035.                             [_v, _x, [_x_cargo_offset,-2.5,_zload], [_x_cargo_offset,_counter + 13.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2036.                         };
  2037.                         if ((_obj_type in IL_Supported_Vehicles_Y32)  && (_doors == "B")) then
  2038.                         {
  2039.                             [_v, _x, [_x_cargo_offset,-5,-0.5 + _zload], [_x_cargo_offset,-3.5,-0.5 + _zload], 1, _turn] call IL_Move_Attach;
  2040.                             [_v, _x, [_x_cargo_offset,-3.5,-0.5 + _zload], [_x_cargo_offset,-2,_zload], 1, _turn] call IL_Move_Attach;
  2041.                             [_v, _x, [_x_cargo_offset,-2,_zload], [_x_cargo_offset,_counter + 7.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2042.                         };
  2043.                         if ((_obj_type in IL_Supported_Vehicles_HURON)  && (_doors == "B")) then
  2044.                         {
  2045.                             [_v, _x, [_x_cargo_offset,-9,-0.75 + _zload], [_x_cargo_offset,-7,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2046.                             [_v, _x, [_x_cargo_offset,-7,-0.75 + _zload], [_x_cargo_offset,-4,_zload], 1, _turn] call IL_Move_Attach;
  2047.                             [_v, _x, [_x_cargo_offset,-4,_zload], [_x_cargo_offset,_counter + 7.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2048.                         };
  2049.                         if ((_obj_type in IL_Supported_Vehicles_HUNTER) && (_doors == "B")) then
  2050.                         {
  2051.                             [_v, _x, [_x_cargo_offset,-4.5,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2052.                         };
  2053.                         if ((_obj_type in IL_Supported_Vehicles_IFRIT) && (_doors == "B")) then
  2054.                         {
  2055.                             [_v, _x, [_x_cargo_offset,-4.5,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2056.                         };
  2057.                         if ((_obj_type in IL_Supported_Vehicles_STRIDER) && (_doors == "B")) then
  2058.                         {
  2059.                             [_v, _x, [_x_cargo_offset,-4.5,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2060.                         };
  2061.                         if ((_obj_type in IL_Supported_Vehicles_LANDROVER) && (_doors == "B")) then
  2062.                         {
  2063.                             [_v, _x, [_x_cargo_offset,-4.5,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2064.                         };
  2065.                         if ((_obj_type in IL_Supported_Vehicles_AMBULANCE) && (_doors == "B")) then
  2066.                         {
  2067.                             [_v, _x, [_x_cargo_offset,-4.5,_zload], [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2068.                         };
  2069.  
  2070.                         _counter = _counter - (_x getVariable "slots");
  2071.  
  2072.                         if (_doors == "B") then
  2073.                         {
  2074.                             _v setVariable["box_num", _counter, true];
  2075.                         };
  2076.                         if ((_obj_type in IL_Supported_Vehicles_MH9)  && (_doors == "L")) then
  2077.                         {
  2078.                             _v setVariable["box_num_l", _counter, true];
  2079.                             _v setVariable["box_l", _x, true];
  2080.                         };
  2081.                         if ((_obj_type in IL_Supported_Vehicles_MH9)  && (_doors == "R")) then
  2082.                         {
  2083.                             _v setVariable["box_num_r", _counter, true];
  2084.                             _v setVariable["box_r", _x, true];
  2085.                         };
  2086.  
  2087.                         [_v] call IL_SetNewMass;
  2088.  
  2089.                         if (_x isKindOf "AllVehicles") then
  2090.                         {
  2091.                             _x forceSpeed 0;
  2092.                         };
  2093.  
  2094.                         _x setVariable["attachedPos", _counter, true];
  2095.                         _x setVariable["attachedTruck", _v, true];
  2096.                         _x setVariable["doors", _doors, true];
  2097.  
  2098.                         if (IL_CDamage == 0) then
  2099.                         {
  2100.                             _x setDamage 0;
  2101.                         };
  2102.  
  2103.                         if (IL_CDamage == 1) then
  2104.                         {
  2105.                             _x setDamage _damage;
  2106.                             if (_damage != (getDammage _x)) then
  2107.                             {
  2108.                                 sleep 1;
  2109.                                 _x setDamage _damage;
  2110.                             };
  2111.                         };
  2112.  
  2113.                         _IL_noti = getText(configFile >> "cfgVehicles" >> typeOf _x >> "displayName");
  2114.                         _x call ExileServer_object_vehicle_database_update;
  2115.                         ["Success", format ["%1 successfully loaded!",_IL_noti]] call ExileClient_gui_notification_event_addNotification;
  2116.                         [Player, IL_Load_Score] call IL_Score;
  2117.                         };
  2118.                     }
  2119.                     else
  2120.                     {
  2121.                     ["Whoops", ["Locked vehicles can't be loaded!"]] call ExileClient_gui_notification_event_addNotification;
  2122.                     };
  2123.                 }
  2124.                 else
  2125.                 {
  2126.                 ["Whoops", ["Locked vehicles can't load Cargo!"]] call ExileClient_gui_notification_event_addNotification;
  2127.                 };
  2128.  
  2129.                 if (_done) exitWith {};
  2130.             } forEach (_obj_lst);
  2131.  
  2132.         };
  2133.         _v setVariable["can_load", true, true];
  2134.     };
  2135.  
  2136.     IL_Do_Unload =
  2137.     {
  2138.         private ["_v", "_para", "_supported_cargo", "_doors", "_counter", "_done", "_obj_lst", "_zload", "_x_cargo_offset", "_cargo_offset", "_obj_type", "_damage", "_nic", "_free_slots", "_turn", "_skip", "_last_attach_pos"];
  2139.         _v = _this select 0;
  2140.         _para = if (count _this > 1) then {_this select 1} else {false};
  2141.         _doors = if (count _this > 2) then {_this select 2} else {"B"};
  2142.  
  2143.         _v setVariable["can_load", false, true];
  2144.         _counter = 0;
  2145.         _done = false;
  2146.         _turn = false;
  2147.         _skip = true;
  2148.         _obj_lst = [];
  2149.  
  2150.         _obj_type = (typeOf _v);
  2151.         if (_obj_type in IL_Supported_Vehicles_MH9) then
  2152.         {
  2153.             if (_doors == "L") then
  2154.             {
  2155.                 _obj_lst = [_v getVariable "box_l"];
  2156.             }
  2157.             else
  2158.             {
  2159.                 _obj_lst = [_v getVariable "box_r"];
  2160.             };
  2161.         }
  2162.         else
  2163.         {
  2164.             _obj_lst = attachedObjects _v;
  2165.         };
  2166.  
  2167.         if (count (_obj_lst) > 0) then
  2168.         {
  2169.             {
  2170.                 _obj_type = (typeOf _v);
  2171.  
  2172.                 if (_x getVariable "doors" == _doors) then
  2173.                 {
  2174.                     if (_doors == "B") then
  2175.                     {
  2176.                         _counter = (_v getVariable "box_num");
  2177.                     };
  2178.                     if (_doors == "L") then
  2179.                     {
  2180.                         _counter = (_v getVariable "box_num_l");
  2181.                     };
  2182.                     if (_doors == "R") then
  2183.                     {
  2184.                         _counter = (_v getVariable "box_num_r");
  2185.                     };
  2186.                     if (((_x getVariable "attachedTruck") == _v) && ((_x getVariable "attachedPos") == (_counter)) && (_counter < 0) && !_done) then
  2187.                     {
  2188.                         _done = true;
  2189.                         _skip = false;
  2190.                         _zload = (_v getVariable "zload") + (_x getVariable "zload_cargo");
  2191.                         _cargo_offset = (_v getVariable "load_offset") + (_x getVariable "cargo_offset");
  2192.                         _damage = getDammage _x;
  2193.                         if ((typeOf _x) in IL_Supported_UGV) then
  2194.                         {
  2195.                             _x_cargo_offset = -0.4;
  2196.                         }
  2197.                         else
  2198.                         {
  2199.                             _x_cargo_offset = 0;
  2200.                         };
  2201.  
  2202.                         _obj_type = (typeOf _v);
  2203.                         if ((_obj_type in IL_Supported_Vehicles_VAN) && (_doors == "B")) then
  2204.                         {
  2205.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-4.5,_zload], 1, _turn] call IL_Move_Attach;
  2206.                         };
  2207.                         if ((_obj_type in IL_Supported_Vehicles_OFFROAD) && (_doors == "B")) then
  2208.                         {
  2209.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-4.5,_zload], 1, _turn] call IL_Move_Attach;
  2210.                         };
  2211.                         if ((_obj_type in IL_Supported_Vehicles_KAMAZ) && (_doors == "B")) then
  2212.                         {
  2213.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-6 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2214.                         };
  2215.                         if ((_obj_type in IL_Supported_Vehicles_HEMTT) && (_doors == "B")) then
  2216.                         {
  2217.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-7 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2218.                         };
  2219.                         if ((_obj_type in IL_Supported_Vehicles_URAL_COVERED) && (_doors == "B")) then
  2220.                         {
  2221.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-5,_zload], 1, _turn] call IL_Move_Attach;
  2222.                         };
  2223.                         if ((_obj_type in IL_Supported_Vehicles_URAL_OPEN) && (_doors == "B")) then
  2224.                         {
  2225.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-5,_zload], 1, _turn] call IL_Move_Attach;
  2226.                         };
  2227.                         if ((_obj_type in IL_Supported_Vehicles_TEMPEST) && (_doors == "B")) then
  2228.                         {
  2229.                             [_v, _x, [_x_cargo_offset,_counter - _cargo_offset,_zload], [_x_cargo_offset,-6.5 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2230.                         };
  2231.                         if ((_obj_type in IL_Supported_Vehicles_CHINOOK)  && (_doors == "B")) then
  2232.                         {
  2233.                             if !(_para) then
  2234.                             {
  2235.                                 [_v, _x, [_x_cargo_offset,_counter + 9 - _cargo_offset,_zload], [_x_cargo_offset,-4,_zload], 1, _turn] call IL_Move_Attach;
  2236.                             };
  2237.                             [_v, _x, [_x_cargo_offset,-4,_zload], [_x_cargo_offset,-7,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2238.                             [_v, _x, [_x_cargo_offset,-7,-0.75 + _zload], [_x_cargo_offset,-9,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2239.                             if ((_para) && (_obj_type in IL_Para_Drop_Vehicles)) then
  2240.                             {
  2241.                                 _last_attach_pos = [_x_cargo_offset,-10,-0.75 + _zload];
  2242.                             };
  2243.                         };
  2244.                         if ((_obj_type in IL_Supported_Vehicles_MOHAWK)  && (_doors == "B")) then
  2245.                         {
  2246.                             if !(_para) then
  2247.                             {
  2248.                                 [_v, _x, [_x_cargo_offset,_counter + 9 - _cargo_offset,_zload], [_x_cargo_offset,-1.5,_zload], 1, _turn] call IL_Move_Attach;
  2249.                             };
  2250.                             [_v, _x, [_x_cargo_offset,-1.5,_zload], [_x_cargo_offset,-4.5,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2251.                             [_v, _x, [_x_cargo_offset,-4.5,-0.75 + _zload], [_x_cargo_offset,-6,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2252.                             if ((_para) && (_obj_type in IL_Para_Drop_Vehicles)) then
  2253.                             {
  2254.                                 _last_attach_pos = [_x_cargo_offset,-6,-0.75 + _zload];
  2255.                             };
  2256.                         };
  2257.                         if ((_obj_type in IL_Supported_Vehicles_MH9)  && (_doors == "L")) then
  2258.                         {
  2259.                             [_v, _x, [_x_cargo_offset-1,-0.2,_zload], [_x_cargo_offset-3,1.3,-0.75 + _zload], 1] call IL_Move_Attach;
  2260.                             if ((_para) && (_obj_type in IL_Para_Drop_Vehicles)) then
  2261.                             {
  2262.                                 _last_attach_pos = [_x_cargo_offset-3,1.3,-0.75 + _zload];
  2263.                             };
  2264.                         };
  2265.                         if ((_obj_type in IL_Supported_Vehicles_MH9)  && (_doors == "R")) then
  2266.                         {
  2267.                             [_v, _x, [_x_cargo_offset+1,-0.2,_zload], [_x_cargo_offset+3,1.3,-0.75 + _zload], 1] call IL_Move_Attach;
  2268.                             if ((_para) && (_obj_type in IL_Para_Drop_Vehicles)) then
  2269.                             {
  2270.                                 _last_attach_pos = [_x_cargo_offset+3,1.3,-0.75 + _zload];
  2271.                             };
  2272.                         };
  2273.                         if ((_obj_type in IL_Supported_Vehicles_V3S) && (_doors == "B")) then
  2274.                         {
  2275.                             [_v, _x, [_x_cargo_offset,_counter - _cargo_offset,_zload], [_x_cargo_offset,-6.5 - _cargo_offset,_zload], 1, _turn] call IL_Move_Attach;
  2276.                         };
  2277.                         if ((_obj_type in IL_Supported_Vehicles_BLACKFISH)  && (_doors == "B")) then
  2278.                         {
  2279.                             if !(_para) then
  2280.                             {
  2281.                                 [_v, _x, [_x_cargo_offset,_counter + 9 - _cargo_offset,_zload], [_x_cargo_offset,-12.5,_zload], 1, _turn] call IL_Move_Attach;
  2282.                             };
  2283.                             [_v, _x, [_x_cargo_offset,-4.5,_zload], [_x_cargo_offset,-7,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2284.                             [_v, _x, [_x_cargo_offset,-4.5,-0.75 + _zload], [_x_cargo_offset,-12.5,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2285.                             if ((_para) && (_obj_type in IL_Para_Drop_Vehicles)) then
  2286.                             {
  2287.                                 _last_attach_pos = [_x_cargo_offset,-10,-0.75 + _zload];
  2288.                             };
  2289.                         };
  2290.                         if ((_obj_type in IL_Supported_Vehicles_Y32)  && (_doors == "B")) then
  2291.                         {
  2292.                             if !(_para) then
  2293.                             {
  2294.                                 [_v, _x, [_x_cargo_offset,_counter + 9 - _cargo_offset,_zload], [_x_cargo_offset,-4,_zload], 1, _turn] call IL_Move_Attach;
  2295.                             };
  2296.                             [_v, _x, [_x_cargo_offset,-4,_zload], [_x_cargo_offset,-7,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2297.                             [_v, _x, [_x_cargo_offset,-7,-0.75 + _zload], [_x_cargo_offset,-9,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2298.                             if ((_para) && (_obj_type in IL_Para_Drop_Vehicles)) then
  2299.                             {
  2300.                                 _last_attach_pos = [_x_cargo_offset,-10,-0.75 + _zload];
  2301.                             };
  2302.                         };
  2303.                         if ((_obj_type in IL_Supported_Vehicles_HURON)  && (_doors == "B")) then
  2304.                         {
  2305.                             if !(_para) then
  2306.                             {
  2307.                                 [_v, _x, [_x_cargo_offset,_counter + 9 - _cargo_offset,_zload], [_x_cargo_offset,-4,_zload], 1, _turn] call IL_Move_Attach;
  2308.                             };
  2309.                             [_v, _x, [_x_cargo_offset,-4,_zload], [_x_cargo_offset,-7,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2310.                             [_v, _x, [_x_cargo_offset,-7,-0.75 + _zload], [_x_cargo_offset,-9,-0.75 + _zload], 1, _turn] call IL_Move_Attach;
  2311.                             if ((_para) && (_obj_type in IL_Para_Drop_Vehicles)) then
  2312.                             {
  2313.                                 _last_attach_pos = [_x_cargo_offset,-10,-0.75 + _zload];
  2314.                             };
  2315.                         };
  2316.                         if ((_obj_type in IL_Supported_Vehicles_HUNTER) && (_doors == "B")) then
  2317.                         {
  2318.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-5.5,_zload], 1, _turn] call IL_Move_Attach;
  2319.                         };
  2320.                         if ((_obj_type in IL_Supported_Vehicles_IFRIT) && (_doors == "B")) then
  2321.                         {
  2322.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-5.7,_zload], 1, _turn] call IL_Move_Attach;
  2323.                         };
  2324.                         if ((_obj_type in IL_Supported_Vehicles_STRIDER) && (_doors == "B")) then
  2325.                         {
  2326.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-5.7,_zload], 1, _turn] call IL_Move_Attach;
  2327.                         };
  2328.                         if ((_obj_type in IL_Supported_Vehicles_LANDROVER) && (_doors == "B")) then
  2329.                         {
  2330.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-4.5,_zload], 1, _turn] call IL_Move_Attach;
  2331.                         };
  2332.                         if ((_obj_type in IL_Supported_Vehicles_AMBULANCE) && (_doors == "B")) then
  2333.                         {
  2334.                             [_v, _x, [_x_cargo_offset,_counter + 0.25 - _cargo_offset,_zload], [_x_cargo_offset,-4.5,_zload], 1, _turn] call IL_Move_Attach;
  2335.                         };
  2336.  
  2337.  
  2338.                         if ((_para) && (_obj_type in IL_Para_Drop_Vehicles)) then
  2339.                         {
  2340.                             _player_velocity = velocity (vehicle player);
  2341.                             [_x, _v, _last_attach_pos, _player_velocity] spawn IL_Cargo_Para;
  2342.                         }
  2343.                         else
  2344.                         {
  2345.                             sleep 0.2;
  2346.                             detach _x;
  2347.                             _x setVelocity [0, 0, -0.2];
  2348.                         };
  2349.  
  2350.                         if (_x isKindOf "AllVehicles") then
  2351.                         {
  2352.                             _x forceSpeed -1;
  2353.                         };
  2354.  
  2355.                         _counter = _counter + (_x getVariable "slots");
  2356.                         if (_doors == "B") then
  2357.                         {
  2358.                             _v setVariable["box_num", _counter, true];
  2359.                             _free_slots = abs((_v getVariable "slots_num") - (_v getVariable "box_num"));
  2360.                         };
  2361.                         if (_doors == "L") then
  2362.                         {
  2363.                             _v setVariable["box_num_l", _counter, true];
  2364.                             _v setVariable["box_l", _v, true];
  2365.                             _free_slots = abs((_v getVariable "slots_num_l") - (_v getVariable "box_num_l"));
  2366.                         };
  2367.                         if (_doors == "R") then
  2368.                         {
  2369.                             _v setVariable["box_num_r", _counter, true];
  2370.                             _v setVariable["box_r", _v, true];
  2371.                             _free_slots = abs((_v getVariable "slots_num_r") - (_v getVariable "box_num_r"));
  2372.                         };
  2373.  
  2374.                         [_v] call IL_SetNewMass;
  2375.  
  2376.                         _x setVariable["attachedPos", 0, true];
  2377.                         _x setVariable["attachedTruck", _x, true];
  2378.                         _x setVariable["doors", "N", true];
  2379.  
  2380.                         if (IL_CDamage == 0) then
  2381.                         {
  2382.                             _x setDamage 0;
  2383.                         };
  2384.  
  2385.                         if (IL_CDamage == 1) then
  2386.                         {
  2387.                             _x setDamage _damage;
  2388.                             if (_damage != (getDammage _x)) then
  2389.                             {
  2390.                                 sleep 1;
  2391.                                 _x setDamage _damage;
  2392.                             };
  2393.                         };
  2394.                         [Player, IL_Unload_Score] call IL_Score;
  2395.                         sleep 1;
  2396.                     };
  2397.                 };
  2398.                 _IL_noti = getText(configFile >> "cfgVehicles" >> typeOf _x >> "displayName");
  2399.                 ["Success", format ["%1 successfully unloaded!",_IL_noti]] call ExileClient_gui_notification_event_addNotification;
  2400.  
  2401.                 if (_done) exitWith {};
  2402.             } forEach (_obj_lst);
  2403.             if (_skip) then
  2404.             {
  2405.  
  2406.                 if (_counter < 0) then
  2407.                 {
  2408.                     _counter = _counter + 1;
  2409.                 };
  2410.  
  2411.                 if (_doors == "B") then
  2412.                 {
  2413.                     _v setVariable["box_num", _counter, true];
  2414.                     _free_slots = abs((_v getVariable "slots_num") - (_v getVariable "box_num"));
  2415.                 };
  2416.                 if (_doors == "L") then
  2417.                 {
  2418.                     _v setVariable["box_num_l", _counter, true];
  2419.                     _v setVariable["box_l", _v, true];
  2420.                     _free_slots = abs((_v getVariable "slots_num_l") - (_v getVariable "box_num_l"));
  2421.                 };
  2422.                 if (_doors == "R") then
  2423.                 {
  2424.                     _v setVariable["box_num_r", _counter, true];
  2425.                     _v setVariable["box_r", _v, true];
  2426.                     _free_slots = abs((_v getVariable "slots_num_r") - (_v getVariable "box_num_r"));
  2427.                 };
  2428.             };
  2429.         }
  2430.         else
  2431.         {
  2432.             [_v, true] call IL_Init_Veh;
  2433.         };
  2434.         [_v] call IL_SetNewMass;
  2435.         _v setVariable["can_load", true, true];
  2436.     };
  2437.  
  2438.     IL_Server_GetOut =
  2439.     {
  2440.         private ["_v", "_player", "_para", "_chute",  "_backpack", "_pos", "_x_offset", "_dist", "_dist_out", "_dist_out_para", "_velocity"];
  2441.         _vars = _this select 1;
  2442.         _v = _vars select 0;
  2443.         _player = _vars select 1;
  2444.         _para = if (count _this > 2) then {_this select 2} else {false};
  2445.  
  2446.         if ((typeOf _v) in IL_Supported_Vehicles_MH9) then
  2447.         {
  2448.             _dist_out = 5;
  2449.             _dist_out_para = 5;
  2450.         };
  2451.         if ((typeOf _v) in IL_Supported_Vehicles_MOHAWK) then
  2452.         {
  2453.             _dist_out = 5;
  2454.             _dist_out_para = 11;
  2455.         };
  2456.         if ((typeOf _v) in IL_Supported_Vehicles_CHINOOK) then
  2457.         {
  2458.             _dist_out = 7;
  2459.             _dist_out_para = 11;
  2460.         };
  2461.         if ((typeOf _v) in IL_Supported_Vehicles_BLACKFISH) then
  2462.         {
  2463.             _dist_out = 14;
  2464.             _dist_out_para = 17;
  2465.         };
  2466.         if ((typeOf _v) in IL_Supported_Vehicles_Y32) then
  2467.         {
  2468.             _dist_out = 5;
  2469.             _dist_out_para = 11;
  2470.         };
  2471.         if ((typeOf _v) in IL_Supported_Vehicles_HURON) then
  2472.         {
  2473.             _dist_out = 7;
  2474.             _dist_out_para = 11;
  2475.         };
  2476.  
  2477.         _pos = (_v worldToModel (getPosATL _player));
  2478.         _x_offset = _pos select 0;
  2479.         if (_x_offset < 0) then
  2480.         {
  2481.             if ((typeOf _v) in IL_Supported_Vehicles_MH9) then
  2482.             {
  2483.                 _x_offset = 90;
  2484.             }
  2485.             else
  2486.             {
  2487.                 _x_offset = 8;
  2488.             };
  2489.         }
  2490.         else
  2491.         {
  2492.             if ((typeOf _v) in IL_Supported_Vehicles_MH9) then
  2493.             {
  2494.                 _x_offset = -90;
  2495.             }
  2496.             else
  2497.             {
  2498.                 _x_offset = -8;
  2499.             };
  2500.         };
  2501.  
  2502.         _player allowDamage false;
  2503.         sleep 0.2;
  2504.         unassignVehicle _player;
  2505.         _player action ["EJECT",vehicle _player];
  2506.         sleep 0.5;
  2507.  
  2508.         if !(_para) then
  2509.         {
  2510.             _player setDir ((getDir _v) + 180);
  2511.             _pos = ([_v, _dist_out, ((getDir _v) + 180 + _x_offset)] call BIS_fnc_relPos);
  2512.             _pos = [_pos select 0, _pos select 1, ((getPosATL _v) select 2)];
  2513.             _player setPosATL _pos;
  2514.         }
  2515.         else
  2516.         {
  2517.             _pos = ([_v, _dist_out_para, ((getDir _v) + 180 + _x_offset)] call BIS_fnc_relPos);
  2518.             _pos = [_pos select 0, _pos select 1, ((getPosATL _v) select 2)];
  2519.             _player setPosATL _pos;
  2520.             _dist = _v distance _player;
  2521.             while {(_v distance _player) - _dist < 20} do
  2522.             {
  2523.                 sleep 0.2;
  2524.             };
  2525.             if (IL_Para_Jump_Open_ATL > 0) then
  2526.             {
  2527.                 while {(getPosATL _player) select 2 > IL_Para_Jump_Open_ATL} do
  2528.                 {
  2529.                     sleep 0.2;
  2530.                 };
  2531.             };
  2532.             if !(unitBackpack _player isKindOf "B_Parachute") then
  2533.             {
  2534.                 _chute = createVehicle ["Steerable_Parachute_F", position _player, [], 0, "CAN_COLLIDE"];
  2535.                 _chute AttachTo [_player, [0,0,0]];
  2536.                 detach _chute;
  2537.                 _velocity = velocity _player;
  2538.                 _player moveInDriver _chute;
  2539.                 if (IL_Para_Jump_Velocity) then
  2540.                 {
  2541.                     _chute setVelocity _velocity;
  2542.                 };
  2543.             };
  2544.         };
  2545.         _player allowDamage true;
  2546.  
  2547.     };
  2548.  
  2549.     IL_GetOut = {
  2550.         private ["_cargo", "_v", "_last_attach_pos"];
  2551.         IL_Client_GetOut = _this;
  2552.         if (isServer) then
  2553.         {
  2554.             IL_Client_GetOut spawn IL_Server_GetOut;
  2555.         }
  2556.         else
  2557.         {
  2558.             publicVariableServer "IL_Client_GetOut";
  2559.         };
  2560.     };
  2561.     "IL_Client_GetOut" addPublicVariableEventHandler IL_GetOut;
  2562.  
  2563. };
  2564.  
  2565. _vsupported = false;
  2566. if (_obj_main_type in IL_Supported_Vehicles_MOHAWK) then
  2567. {
  2568.  
  2569.     _vsupported = true;
  2570.     [_obj_main] call IL_Init_Veh;
  2571.  
  2572.     _obj_main addAction [
  2573.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load cargo on CH-49</t>",
  2574.     {
  2575.         [_this select 0, IL_Supported_Cargo_NonVeh_Mohawk] call IL_Do_Load;
  2576.     },[],IL_Action_LU_Priority,true,true,"",
  2577.     "(count(nearestObjects[ _target modelToWorld [0,-6,-3], IL_Supported_Cargo_NonVeh_Mohawk, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'CargoRamp_Open' == 1)"
  2578.     ];
  2579.  
  2580.     _obj_main addAction [
  2581.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load vehicle on CH-49</t>",
  2582.     {
  2583.         [_this select 0, IL_Supported_Cargo_Veh_Mohawk] call IL_Do_Load;
  2584.     },[],IL_Action_LU_Priority,true,true,"",
  2585.     "(count(nearestObjects[ _target modelToWorld [0,-6,-3], IL_Supported_Cargo_Veh_Mohawk, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'CargoRamp_Open' == 1)"
  2586.     ];
  2587.  
  2588.     _obj_main addAction [
  2589.     "<t color=""#007f0e"">Get in CH-49</t>",
  2590.     {
  2591.         (_this select 1) moveInCargo (_this select 0);
  2592.     },[],IL_Action_LU_Priority,false,true,"",
  2593.     "(_this in (nearestObjects[ _target modelToWorld [0,-6,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'CargoRamp_Open' > 0.43) && (_target getVariable 'usable_ramp')"
  2594.     ];
  2595.  
  2596.     _obj_main addAction [
  2597.     "<t color=""#ff0000"">Get out CH-49</t>",
  2598.     {
  2599.         [_this select 0, _this select 1, false] call IL_GetOut;
  2600.     },[],IL_Action_LU_Priority,false,true,"",
  2601.     "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'CargoRamp_Open' > 0.43) && (_target getVariable 'usable_ramp')"
  2602.     ];
  2603.  
  2604.     _obj_main addAction [
  2605.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Eject</t>",
  2606.     {
  2607.         [_this select 0, _this select 1, true] call IL_GetOut;
  2608.     },[],IL_Action_LU_Priority,false,true,"",
  2609.     "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (((getPosATL _target) select 2) >= IL_Para_Jump_ATL) && (_target animationPhase 'CargoRamp_Open' > 0.43) && (_target getVariable 'usable_ramp')"
  2610.     ];
  2611.  
  2612.     _obj_main addAction [
  2613.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">Unload cargo from CH-49</t>",
  2614.     {
  2615.         [_this select 0] call IL_Do_Unload;
  2616.     },[],IL_Action_LU_Priority,false,true,"",
  2617.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'CargoRamp_Open' == 1)"
  2618.     ];
  2619.  
  2620.     _obj_main addAction [
  2621.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Unload cargo with parachute</t>",
  2622.     {
  2623.         [_this select 0, true] call IL_Do_Unload;
  2624.     },[],IL_Action_LU_Priority,false,true,"",
  2625.     "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target animationPhase 'CargoRamp_Open' == 1)"
  2626.     ];
  2627.  
  2628.     _obj_main addAction [
  2629.     "<img image='IgiLoad\images\unload_all_para.paa' /><t color=""#a50b00"">Unload ALL cargo with parachute</t>",
  2630.     {
  2631.         while {((_this select 0) getVariable "box_num") != 0} do
  2632.         {
  2633.             [_this select 0, true] call IL_Do_Unload;
  2634.         };
  2635.     },[],IL_Action_LU_Priority,false,true,"",
  2636.     "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target animationPhase 'CargoRamp_Open' == 1)"
  2637.     ];
  2638.  
  2639.     _obj_main addAction [
  2640.     "<t color=""#0000ff"">Open cargo ramp in CH-49</t>",
  2641.     {
  2642.         _this select 0 animatedoor ['CargoRamp_Open', 1];
  2643.     },[],IL_Action_O_Priority,false,true,"",
  2644.     "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target animationPhase 'CargoRamp_Open' == 0) && (_target getVariable 'can_load')"
  2645.     ];
  2646.  
  2647.     _obj_main addAction [
  2648.     "<t color=""#0000ff"">Close cargo ramp in CH-49</t>",
  2649.     {
  2650.         _this select 0 animatedoor ['CargoRamp_Open', 0];
  2651.     },[],IL_Action_O_Priority,false,true,"",
  2652.     "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target animationPhase 'CargoRamp_Open' == 1) && (_target getVariable 'can_load')"
  2653.     ];
  2654.  
  2655.     _obj_main addAction [
  2656.     "<t color=""#0000ff"">Enable loading for Co-Pilot</t>",
  2657.     {
  2658.         (_this select 0) setVariable["can_copilot", true, true];;
  2659.     },[],IL_Action_S_Priority,false,true,"",
  2660.     "((driver _target == _this) && !(_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  2661.     ];
  2662.  
  2663.     _obj_main addAction [
  2664.     "<t color=""#0000ff"">Disable loading for Co-Pilot</t>",
  2665.     {
  2666.         (_this select 0) setVariable["can_copilot", false, true];;
  2667.     },[],IL_Action_S_Priority,false,true,"",
  2668.     "((driver _target == _this) && (_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  2669.     ];
  2670.  
  2671.     _obj_main addAction [
  2672.     "<t color=""#0000ff"">Enable loading from outside</t>",
  2673.     {
  2674.         (_this select 0) setVariable["can_outside", true, true];;
  2675.     },[],IL_Action_S_Priority,false,true,"",
  2676.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  2677.     ];
  2678.  
  2679.     _obj_main addAction [
  2680.     "<t color=""#0000ff"">Disable loading from outside</t>",
  2681.     {
  2682.         (_this select 0) setVariable["can_outside", false, true];;
  2683.     },[],IL_Action_S_Priority,false,true,"",
  2684.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  2685.     ];
  2686.  
  2687.     _obj_main addAction [
  2688.     "<t color=""#0000ff"">Enable usable ramp</t>",
  2689.     {
  2690.         (_this select 0) setVariable["usable_ramp", true, true];;
  2691.     },[],IL_Action_S_Priority,false,true,"",
  2692.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'usable_ramp') && IL_Ramp)"
  2693.     ];
  2694.  
  2695.     _obj_main addAction [
  2696.     "<t color=""#0000ff"">Disable usable ramp</t>",
  2697.     {
  2698.         (_this select 0) setVariable["usable_ramp", false, true];;
  2699.     },[],IL_Action_S_Priority,false,true,"",
  2700.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'usable_ramp') && IL_Ramp)"
  2701.     ];
  2702. };
  2703. if (_obj_main_type in IL_Supported_Vehicles_CHINOOK) then
  2704. {
  2705.  
  2706.     _vsupported = true;
  2707.     [_obj_main] call IL_Init_Veh;
  2708.  
  2709.     if (typeOf _obj_main == "CH_147F") then
  2710.     {
  2711.         _obj_main addAction [
  2712.         "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load cargo on Chinook</t>",
  2713.         {
  2714.             [_this select 0, IL_Supported_Cargo_NonVeh_CHINOOK] call IL_Do_Load;
  2715.         },[],IL_Action_LU_Priority,true,true,"",
  2716.         "(count(nearestObjects[ _target modelToWorld [0,-9,-3], IL_Supported_Cargo_NonVeh_CHINOOK, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'ani_ramp' == 1)"
  2717.         ];
  2718.  
  2719.         _obj_main addAction [
  2720.         "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load vehicle on Chinook</t>",
  2721.         {
  2722.             [_this select 0, IL_Supported_Cargo_Veh_CHINOOK] call IL_Do_Load;
  2723.         },[],IL_Action_LU_Priority,true,true,"",
  2724.         "(count(nearestObjects[ _target modelToWorld [0,-9,-3], IL_Supported_Cargo_Veh_CHINOOK, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'ani_ramp' == 1)"
  2725.         ];
  2726.  
  2727.         _obj_main addAction [
  2728.         "<t color=""#007f0e"">Get in Chinook Ride in back</t>",
  2729.         {
  2730.             (_this select 1) moveInCargo (_this select 0);
  2731.         },[],IL_Action_LU_Priority,false,true,"",
  2732.         "(_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'ani_ramp' > 0.43) && (_target getVariable 'usable_ramp')"
  2733.         ];
  2734.  
  2735.         _obj_main addAction [
  2736.         "<t color=""#007f0e"">Get in Chinook</t>",
  2737.         {
  2738.             (_this select 1) setDir (getDir (_this select 0));
  2739.             _pos = ([(_this select 0), 4.5, (getDir (_this select 0))] call BIS_fnc_relPos);
  2740.             _pos = [_pos select 0, _pos select 1, ((getPosATL (_this select 0)) select 2) + 1];
  2741.             (_this select 1) setPosATL _pos;
  2742.         },[],IL_Action_LU_Priority,false,true,"",
  2743.         "(_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'ani_ramp' > 0.43) && (_target getVariable 'usable_ramp')"
  2744.         ];
  2745.  
  2746.         _obj_main addAction [
  2747.         "<t color=""#ff0000"">Get out Chinook</t>",
  2748.         {
  2749.             [_this select 0, _this select 1, false] call IL_GetOut;
  2750.         },[],IL_Action_LU_Priority,false,true,"",
  2751.         "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'ani_ramp' > 0.43) && (_target getVariable 'usable_ramp')"
  2752.         ];
  2753.  
  2754.         _obj_main addAction [
  2755.         "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff""> Eject</t>",
  2756.         {
  2757.             [_this select 0, _this select 1, true] call IL_GetOut;
  2758.         },[],IL_Action_LU_Priority,false,true,"",
  2759.         "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (((getPosATL _target) select 2) >= IL_Para_Jump_ATL) && (_target animationPhase 'ani_ramp' > 0.43) && (_target getVariable 'usable_ramp')"
  2760.         ];
  2761.  
  2762.         _obj_main addAction [
  2763.         "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">Unload cargo from Chinook</t>",
  2764.         {
  2765.             [_this select 0] call IL_Do_Unload;
  2766.         },[],IL_Action_LU_Priority,false,true,"",
  2767.         "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'ani_ramp' == 1)"
  2768.         ];
  2769.  
  2770.         _obj_main addAction [
  2771.         "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Unload cargo with parachute</t>",
  2772.         {
  2773.             [_this select 0, true] call IL_Do_Unload;
  2774.         },[],IL_Action_LU_Priority,false,true,"",
  2775.         "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target animationPhase 'ani_ramp' == 1)"
  2776.         ];
  2777.  
  2778.         _obj_main addAction [
  2779.         "<img image='IgiLoad\images\unload_all_para.paa' /><t color=""#a50b00"">  Unload ALL cargo with parachute</t>",
  2780.         {
  2781.             while {((_this select 0) getVariable "box_num") != 0} do
  2782.             {
  2783.                 [_this select 0, true] call IL_Do_Unload;
  2784.             };
  2785.         },[],IL_Action_LU_Priority,false,true,"",
  2786.         "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target animationPhase 'ani_ramp' == 1)"
  2787.         ];
  2788.  
  2789.         _obj_main addAction [
  2790.         "<t color=""#0000ff"">Open cargo ramp in Chinook</t>",
  2791.         {
  2792.             _this select 0 animatedoor ['ani_ramp', 1];
  2793.             _this select 0 animatedoor ['ani_ramp2', 1];
  2794.         },[],IL_Action_O_Priority,false,true,"",
  2795.         "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target animationPhase 'ani_ramp' == 0) && (_target getVariable 'can_load')"
  2796.         ];
  2797.  
  2798.         _obj_main addAction [
  2799.         "<t color=""#0000ff"">Close cargo ramp in Chinook</t>",
  2800.         {
  2801.             _this select 0 animatedoor ['ani_ramp', 0];
  2802.             _this select 0 animatedoor ['ani_ramp2', 0];
  2803.         },[],IL_Action_O_Priority,false,true,"",
  2804.         "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target animationPhase 'ani_ramp' == 1) && (_target getVariable 'can_load')"
  2805.         ];
  2806.     };
  2807.     if (typeOf _obj_main == "CH_47F") then
  2808.     {
  2809.         _obj_main addAction [
  2810.         "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load cargo on Chinook</t>",
  2811.         {
  2812.             [_this select 0, IL_Supported_Cargo_NonVeh_CHINOOK] call IL_Do_Load;
  2813.         },[],IL_Action_LU_Priority,true,true,"",
  2814.         "(count(nearestObjects[ _target modelToWorld [0,-9,-3], IL_Supported_Cargo_NonVeh_CHINOOK, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ramp' == 1)"
  2815.         ];
  2816.  
  2817.         _obj_main addAction [
  2818.         "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load vehicle on Chinook</t>",
  2819.         {
  2820.             [_this select 0, IL_Supported_Cargo_Veh_CHINOOK] call IL_Do_Load;
  2821.         },[],IL_Action_LU_Priority,true,true,"",
  2822.         "(count(nearestObjects[ _target modelToWorld [0,-9,-3], IL_Supported_Cargo_Veh_CHINOOK, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ramp' == 1)"
  2823.         ];
  2824.  
  2825.         _obj_main addAction [
  2826.         "<t color=""#007f0e"">Get in Chinook Ride in back</t>",
  2827.         {
  2828.             (_this select 1) moveInCargo (_this select 0);
  2829.         },[],IL_Action_LU_Priority,false,true,"",
  2830.         "(_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ramp' > 0.43) && (_target getVariable 'usable_ramp')"
  2831.         ];
  2832.  
  2833.         _obj_main addAction [
  2834.         "<t color=""#007f0e"">Get in Chinook</t>",
  2835.         {
  2836.             (_this select 1) setDir (getDir (_this select 0));
  2837.             _pos = ([(_this select 0), 4.5, (getDir (_this select 0))] call BIS_fnc_relPos);
  2838.             _pos = [_pos select 0, _pos select 1, ((getPosATL (_this select 0)) select 2) + 1];
  2839.             (_this select 1) setPosATL _pos;
  2840.         },[],IL_Action_LU_Priority,false,true,"",
  2841.         "(_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ramp' > 0.43) && (_target getVariable 'usable_ramp')"
  2842.         ];
  2843.  
  2844.         _obj_main addAction [
  2845.         "<t color=""#ff0000"">Get out Chinook</t>",
  2846.         {
  2847.             [_this select 0, _this select 1, false] call IL_GetOut;
  2848.         },[],IL_Action_LU_Priority,false,true,"",
  2849.         "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ramp' > 0.43) && (_target getVariable 'usable_ramp')"
  2850.         ];
  2851.  
  2852.         _obj_main addAction [
  2853.         "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff""> Eject</t>",
  2854.         {
  2855.             [_this select 0, _this select 1, true] call IL_GetOut;
  2856.         },[],IL_Action_LU_Priority,false,true,"",
  2857.         "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (((getPosATL _target) select 2) >= IL_Para_Jump_ATL) && (_target animationPhase 'Ramp' > 0.43) && (_target getVariable 'usable_ramp')"
  2858.         ];
  2859.  
  2860.         _obj_main addAction [
  2861.         "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">Unload cargo from Chinook</t>",
  2862.         {
  2863.             [_this select 0] call IL_Do_Unload;
  2864.         },[],IL_Action_LU_Priority,false,true,"",
  2865.         "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ramp' == 1)"
  2866.         ];
  2867.  
  2868.         _obj_main addAction [
  2869.         "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Unload cargo with parachute</t>",
  2870.         {
  2871.             [_this select 0, true] call IL_Do_Unload;
  2872.         },[],IL_Action_LU_Priority,false,true,"",
  2873.         "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target animationPhase 'Ramp' == 1)"
  2874.         ];
  2875.  
  2876.         _obj_main addAction [
  2877.         "<img image='IgiLoad\images\unload_all_para.paa' /><t color=""#a50b00"">Unload ALL cargo with parachute</t>",
  2878.         {
  2879.             while {((_this select 0) getVariable "box_num") != 0} do
  2880.             {
  2881.                 [_this select 0, true] call IL_Do_Unload;
  2882.             };
  2883.         },[],IL_Action_LU_Priority,false,true,"",
  2884.         "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target animationPhase 'Ramp' == 1)"
  2885.         ];
  2886.  
  2887.         _obj_main addAction [
  2888.         "<t color=""#0000ff"">Open cargo ramp in Chinook</t>",
  2889.         {
  2890.             _this select 0 animate ['Ramp', 1];
  2891.         },[],IL_Action_O_Priority,false,true,"",
  2892.         "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target animationPhase 'Ramp' == 0) && (_target getVariable 'can_load')"
  2893.         ];
  2894.  
  2895.         _obj_main addAction [
  2896.         "<t color=""#0000ff"">Close cargo ramp in Chinook</t>",
  2897.         {
  2898.             _this select 0 animate ['Ramp', 0];
  2899.         },[],IL_Action_O_Priority,false,true,"",
  2900.         "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target animationPhase 'Ramp' == 1) && (_target getVariable 'can_load')"
  2901.         ];
  2902.     };
  2903.     if (typeOf _obj_main in ["kyo_MH47E_HC", "kyo_MH47E_Ramp", "kyo_MH47E_base"]) then
  2904.     {
  2905.         _obj_main addAction [
  2906.         "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load cargo on Chinook</t>",
  2907.         {
  2908.             [_this select 0, IL_Supported_Cargo_NonVeh_CHINOOK] call IL_Do_Load;
  2909.         },[],IL_Action_LU_Priority,true,true,"",
  2910.         "(count(nearestObjects[ _target modelToWorld [0,-9,-3], IL_Supported_Cargo_NonVeh_CHINOOK, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ani_Ramp' < 0.43)"
  2911.         ];
  2912.  
  2913.         _obj_main addAction [
  2914.         "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load vehicle on Chinook</t>",
  2915.         {
  2916.             [_this select 0, IL_Supported_Cargo_Veh_CHINOOK] call IL_Do_Load;
  2917.         },[],IL_Action_LU_Priority,true,true,"",
  2918.         "(count(nearestObjects[ _target modelToWorld [0,-9,-3], IL_Supported_Cargo_Veh_CHINOOK, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ani_Ramp' < 0.43)"
  2919.         ];
  2920.  
  2921.         _obj_main addAction [
  2922.         "<t color=""#007f0e"">Get in Chinook Ride in back</t>",
  2923.         {
  2924.             (_this select 1) moveInCargo (_this select 0);
  2925.         },[],IL_Action_LU_Priority,false,true,"",
  2926.         "(_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ani_Ramp' < 0.43) && (_target getVariable 'usable_ramp')"
  2927.         ];
  2928.  
  2929.         _obj_main addAction [
  2930.         "<t color=""#007f0e"">Get in Chinook</t>",
  2931.         {
  2932.             (_this select 1) setDir (getDir (_this select 0));
  2933.             _pos = ([(_this select 0), 4.5, (getDir (_this select 0))] call BIS_fnc_relPos);
  2934.             _pos = [_pos select 0, _pos select 1, ((getPosATL (_this select 0)) select 2) + 1];
  2935.             (_this select 1) setPosATL _pos;
  2936.         },[],IL_Action_LU_Priority,false,true,"",
  2937.         "(_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ani_Ramp' < 0.43) && (_target getVariable 'usable_ramp')"
  2938.         ];
  2939.  
  2940.         _obj_main addAction [
  2941.         "<t color=""#ff0000"">Get out Chinook</t>",
  2942.         {
  2943.             [_this select 0, _this select 1, false] call IL_GetOut;
  2944.         },[],IL_Action_LU_Priority,false,true,"",
  2945.         "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ani_Ramp' < 0.43) && (_target getVariable 'usable_ramp')"
  2946.         ];
  2947.  
  2948.         _obj_main addAction [
  2949.         "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff""> Eject</t>",
  2950.         {
  2951.             [_this select 0, _this select 1, true] call IL_GetOut;
  2952.         },[],IL_Action_LU_Priority,false,true,"",
  2953.         "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (((getPosATL _target) select 2) >= IL_Para_Jump_ATL) && (_target animationPhase 'Ani_Ramp' < 0.43) && (_target getVariable 'usable_ramp')"
  2954.         ];
  2955.  
  2956.         _obj_main addAction [
  2957.         "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">Unload cargo from Chinook</t>",
  2958.         {
  2959.             [_this select 0] call IL_Do_Unload;
  2960.         },[],IL_Action_LU_Priority,false,true,"",
  2961.         "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Ani_Ramp' < 0.43)"
  2962.         ];
  2963.  
  2964.         _obj_main addAction [
  2965.         "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Unload cargo with parachute</t>",
  2966.         {
  2967.             [_this select 0, true] call IL_Do_Unload;
  2968.         },[],IL_Action_LU_Priority,false,true,"",
  2969.         "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target animationPhase 'Ani_Ramp' < 0.43)"
  2970.         ];
  2971.  
  2972.         _obj_main addAction [
  2973.         "<img image='IgiLoad\images\unload_all_para.paa' /><t color=""#a50b00"">Unload ALL cargo with parachute</t>",
  2974.         {
  2975.             while {((_this select 0) getVariable "box_num") != 0} do
  2976.             {
  2977.                 [_this select 0, true] call IL_Do_Unload;
  2978.             };
  2979.         },[],IL_Action_LU_Priority,false,true,"",
  2980.         "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target animationPhase 'Ani_Ramp' < 0.43)"
  2981.         ];
  2982.  
  2983.         _obj_main addAction [
  2984.         "<t color=""#0000ff"">Open cargo ramp in Chinook</t>",
  2985.         {
  2986.             _this select 0 animate ['Ani_Ramp', 0];
  2987.         },[],IL_Action_O_Priority,false,true,"",
  2988.         "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target animationPhase 'Ani_Ramp' == 1) && (_target getVariable 'can_load')"
  2989.         ];
  2990.  
  2991.         _obj_main addAction [
  2992.         "<t color=""#0000ff"">Close cargo ramp in Chinook</t>",
  2993.         {
  2994.             _this select 0 animate ['Ani_Ramp', 1];
  2995.         },[],IL_Action_O_Priority,false,true,"",
  2996.         "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target animationPhase 'Ani_Ramp' == 0) && (_target getVariable 'can_load')"
  2997.         ];
  2998.     };
  2999.  
  3000.     _obj_main addAction [
  3001.     "<t color=""#0000ff"">Enable loading for Co-Pilot</t>",
  3002.     {
  3003.         (_this select 0) setVariable["can_copilot", true, true];;
  3004.     },[],IL_Action_S_Priority,false,true,"",
  3005.     "((driver _target == _this) && !(_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3006.     ];
  3007.  
  3008.     _obj_main addAction [
  3009.     "<t color=""#0000ff"">Disable loading for Co-Pilot</t>",
  3010.     {
  3011.         (_this select 0) setVariable["can_copilot", false, true];;
  3012.     },[],IL_Action_S_Priority,false,true,"",
  3013.     "((driver _target == _this) && (_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3014.     ];
  3015.  
  3016.     _obj_main addAction [
  3017.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3018.     {
  3019.         (_this select 0) setVariable["can_outside", true, true];;
  3020.     },[],IL_Action_S_Priority,false,true,"",
  3021.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3022.     ];
  3023.  
  3024.     _obj_main addAction [
  3025.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3026.     {
  3027.         (_this select 0) setVariable["can_outside", false, true];;
  3028.     },[],IL_Action_S_Priority,false,true,"",
  3029.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3030.     ];
  3031.  
  3032.     _obj_main addAction [
  3033.     "<t color=""#0000ff"">Enable usable ramp</t>",
  3034.     {
  3035.         (_this select 0) setVariable["usable_ramp", true, true];;
  3036.     },[],IL_Action_S_Priority,false,true,"",
  3037.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'usable_ramp') && IL_Ramp)"
  3038.     ];
  3039.  
  3040.     _obj_main addAction [
  3041.     "<t color=""#0000ff"">Disable usable ramp</t>",
  3042.     {
  3043.         (_this select 0) setVariable["usable_ramp", false, true];;
  3044.     },[],IL_Action_S_Priority,false,true,"",
  3045.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'usable_ramp') && IL_Ramp)"
  3046.     ];
  3047. };
  3048. if (_obj_main_type in IL_Supported_Vehicles_MH9) then
  3049. {
  3050.  
  3051.     _vsupported = true;
  3052.     [_obj_main] call IL_Init_Veh;
  3053.  
  3054.     _obj_main addAction [
  3055.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load cargo on left MH-9</t>",
  3056.     {
  3057.         [_this select 0, IL_Supported_Cargo_MH9, "L"] call IL_Do_Load;
  3058.     },[],IL_Action_LU_Priority,true,true,"",
  3059.     "(count (nearestObjects[ _target modelToWorld [0-3,1,-1.3], IL_Supported_Cargo_MH9, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || (((_this in (nearestObjects[ _target modelToWorld [0-3,1,-1.3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num_l' > _target getVariable 'slots_num_l') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt)"
  3060.     ];
  3061.  
  3062.     _obj_main addAction [
  3063.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load cargo on right MH-9</t>",
  3064.     {
  3065.         [_this select 0, IL_Supported_Cargo_MH9, "R"] call IL_Do_Load;
  3066.     },[],IL_Action_LU_Priority,true,true,"",
  3067.     "(count (nearestObjects[ _target modelToWorld [0+3,1,-1.3], IL_Supported_Cargo_MH9, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || (((_this in (nearestObjects[ _target modelToWorld [0+3,1,-1.3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num_r' > _target getVariable 'slots_num_r') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt)"
  3068.     ];
  3069.  
  3070.     _obj_main addAction [
  3071.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">  Unload cargo from left MH-9</t>",
  3072.     {
  3073.         [_this select 0, false, "L"] call IL_Do_Unload;
  3074.     },[],IL_Action_LU_Priority,false,true,"",
  3075.     "(_target getVariable 'box_num_l' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || (((_this in (nearestObjects[ _target modelToWorld [0-3,1,-1.3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt)"
  3076.     ];
  3077.  
  3078.     _obj_main addAction [
  3079.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">  Unload cargo from right MH-9</t>",
  3080.     {
  3081.         [_this select 0, false, "R"] call IL_Do_Unload;
  3082.     },[],IL_Action_LU_Priority,false,true,"",
  3083.     "(_target getVariable 'box_num_r' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || (((_this in (nearestObjects[ _target modelToWorld [0+3,1,-1.3], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt)"
  3084.     ];
  3085.  
  3086.     _obj_main addAction [
  3087.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">  Unload cargo with parachute left MH-9</t>",
  3088.     {
  3089.         [_this select 0, true, "L"] call IL_Do_Unload;
  3090.     },[],IL_Action_LU_Priority,false,true,"",
  3091.     "(_target getVariable 'box_num_l' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL)"
  3092.     ];
  3093.  
  3094.     _obj_main addAction [
  3095.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">  Unload cargo with parachute right MH-9</t>",
  3096.     {
  3097.         [_this select 0, true, "R"] call IL_Do_Unload;
  3098.     },[],IL_Action_LU_Priority,false,true,"",
  3099.     "(_target getVariable 'box_num_r' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL)"
  3100.     ];
  3101.  
  3102.     _obj_main addAction [
  3103.     "<img image='IgiLoad\images\unload_all_para.paa' /><t color=""#a50b00"">  Unload ALL cargo with parachute</t>",
  3104.     {
  3105.         [_this select 0, true, "L"] call IL_Do_Unload;
  3106.         [_this select 0, true, "R"] call IL_Do_Unload;
  3107.     },[],IL_Action_LU_Priority,false,true,"",
  3108.     "(_target getVariable 'box_num_r' < 0) && (_target getVariable 'box_num_l' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL)"
  3109.     ];
  3110.  
  3111.     _obj_main addAction [
  3112.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff""> Eject</t>",
  3113.     {
  3114.         [_this select 0, _this select 1, true] call IL_GetOut;
  3115.     },[],IL_Action_LU_Priority,false,true,"",
  3116.     "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (((getPosATL _target) select 2) >= IL_Para_Jump_ATL) && (_target getVariable 'usable_ramp')"
  3117.     ];
  3118.  
  3119.     _obj_main addAction [
  3120.     "<t color=""#0000ff"">Enable loading for Co-Pilot</t>",
  3121.     {
  3122.         (_this select 0) setVariable["can_copilot", true, true];;
  3123.     },[],IL_Action_S_Priority,false,true,"",
  3124.     "((driver _target == _this) && !(_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3125.     ];
  3126.  
  3127.     _obj_main addAction [
  3128.     "<t color=""#0000ff"">Disable loading for Co-Pilot</t>",
  3129.     {
  3130.         (_this select 0) setVariable["can_copilot", false, true];;
  3131.     },[],IL_Action_S_Priority,false,true,"",
  3132.     "((driver _target == _this) && (_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3133.     ];
  3134.  
  3135.     _obj_main addAction [
  3136.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3137.     {
  3138.         (_this select 0) setVariable["can_outside", true, true];;
  3139.     },[],IL_Action_S_Priority,false,true,"",
  3140.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3141.     ];
  3142.  
  3143.     _obj_main addAction [
  3144.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3145.     {
  3146.         (_this select 0) setVariable["can_outside", false, true];;
  3147.     },[],IL_Action_S_Priority,false,true,"",
  3148.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3149.     ];
  3150.  
  3151.     _obj_main addAction [
  3152.     "<t color=""#0000ff"">Enable usable ramp</t>",
  3153.     {
  3154.         (_this select 0) setVariable["usable_ramp", true, true];;
  3155.     },[],IL_Action_S_Priority,false,true,"",
  3156.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'usable_ramp') && IL_Ramp)"
  3157.     ];
  3158.  
  3159.     _obj_main addAction [
  3160.     "<t color=""#0000ff"">Disable usable ramp</t>",
  3161.     {
  3162.         (_this select 0) setVariable["usable_ramp", false, true];;
  3163.     },[],IL_Action_S_Priority,false,true,"",
  3164.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'usable_ramp') && IL_Ramp)"
  3165.     ];
  3166.  
  3167. };
  3168. if (_obj_main_type in IL_Supported_Vehicles_OFFROAD) then
  3169. {
  3170.  
  3171.     _vsupported = true;
  3172.     [_obj_main] call IL_Init_Veh;
  3173.  
  3174.     _obj_main addAction [
  3175.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load cargo on Offroad</t>",
  3176.     {
  3177.         [_this select 0, IL_Supported_Cargo_NonVeh_OFFROAD] call IL_Do_Load;
  3178.     },[],IL_Action_LU_Priority,true,true,"",
  3179.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_NonVeh_OFFROAD, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3180.     ];
  3181.  
  3182.     _obj_main addAction [
  3183.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load vehicle on Offroad</t>",
  3184.     {
  3185.         [_this select 0, IL_Supported_Cargo_Veh_OFFROAD] call IL_Do_Load;
  3186.     },[],IL_Action_LU_Priority,true,true,"",
  3187.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_Veh_OFFROAD, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3188.     ];
  3189.  
  3190.     _obj_main addAction [
  3191.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">  Unload cargo from Offroad</t>",
  3192.     {
  3193.         [_this select 0] call IL_Do_Unload;
  3194.     },[],IL_Action_LU_Priority,false,true,"",
  3195.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  3196.     ];
  3197.     _obj_main addAction [
  3198.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3199.     {
  3200.         (_this select 0) setVariable["can_outside", true, true];;
  3201.     },[],IL_Action_S_Priority,false,true,"",
  3202.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3203.     ];
  3204.  
  3205.     _obj_main addAction [
  3206.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3207.     {
  3208.         (_this select 0) setVariable["can_outside", false, true];;
  3209.     },[],IL_Action_S_Priority,false,true,"",
  3210.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3211.     ];
  3212. };
  3213. if (_obj_main_type in IL_Supported_Vehicles_VAN) then
  3214. {
  3215.  
  3216.     _vsupported = true;
  3217.     [_obj_main] call IL_Init_Veh;
  3218.  
  3219.     _obj_main addAction [
  3220.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load cargo on VAN</t>",
  3221.     {
  3222.         [_this select 0, IL_Supported_Cargo_NonVeh_VAN] call IL_Do_Load;
  3223.     },[],IL_Action_LU_Priority,true,true,"",
  3224.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_NonVeh_VAN, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3225.     ];
  3226.  
  3227.     _obj_main addAction [
  3228.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load vehicle on VAN</t>",
  3229.     {
  3230.         [_this select 0, IL_Supported_Cargo_Veh_VAN] call IL_Do_Load;
  3231.     },[],IL_Action_LU_Priority,true,true,"",
  3232.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_Veh_VAN, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3233.     ];
  3234.  
  3235.     _obj_main addAction [
  3236.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">  Unload cargo from VAN</t>",
  3237.     {
  3238.         [_this select 0] call IL_Do_Unload;
  3239.     },[],IL_Action_LU_Priority,false,true,"",
  3240.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  3241.     ];
  3242.  
  3243.     _obj_main addAction [
  3244.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3245.     {
  3246.         (_this select 0) setVariable["can_outside", true, true];;
  3247.     },[],IL_Action_S_Priority,false,true,"",
  3248.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3249.     ];
  3250.  
  3251.     _obj_main addAction [
  3252.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3253.     {
  3254.         (_this select 0) setVariable["can_outside", false, true];;
  3255.     },[],IL_Action_S_Priority,false,true,"",
  3256.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3257.     ];
  3258. };
  3259. if (_obj_main_type in IL_Supported_Vehicles_KAMAZ) then
  3260. {
  3261.  
  3262.     _vsupported = true;
  3263.     [_obj_main] call IL_Init_Veh;
  3264.  
  3265.     _obj_main addAction [
  3266.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load cargo on ZAMAK</t>",
  3267.     {
  3268.         [_this select 0, IL_Supported_Cargo_NonVeh_Kamaz] call IL_Do_Load;
  3269.     },[],IL_Action_LU_Priority,true,true,"",
  3270.     "(count(nearestObjects[ _target modelToWorld [0,-6 - (_target getVariable 'load_offset'),0], IL_Supported_Cargo_NonVeh_Kamaz, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-6 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3271.     ];
  3272.  
  3273.     _obj_main addAction [
  3274.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load vehicle on ZAMAK</t>",
  3275.     {
  3276.         [_this select 0, IL_Supported_Cargo_Veh_Kamaz] call IL_Do_Load;
  3277.     },[],IL_Action_LU_Priority,true,true,"",
  3278.     "(count(nearestObjects[ _target modelToWorld [0,-6 - (_target getVariable 'load_offset'),0], IL_Supported_Cargo_Veh_Kamaz, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-6 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3279.     ];
  3280.  
  3281.     _obj_main addAction [
  3282.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">  Unload cargo from ZAMAK</t>",
  3283.     {
  3284.         [_this select 0] call IL_Do_Unload;
  3285.     },[],IL_Action_LU_Priority,false,true,"",
  3286.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-6 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  3287.     ];
  3288.     _obj_main addAction [
  3289.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3290.     {
  3291.         (_this select 0) setVariable["can_outside", true, true];;
  3292.     },[],IL_Action_S_Priority,false,true,"",
  3293.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3294.     ];
  3295.  
  3296.     _obj_main addAction [
  3297.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3298.     {
  3299.         (_this select 0) setVariable["can_outside", false, true];;
  3300.     },[],IL_Action_S_Priority,false,true,"",
  3301.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3302.     ];
  3303. };
  3304. if (_obj_main_type in IL_Supported_Vehicles_TEMPEST) then
  3305. {
  3306.  
  3307.     _vsupported = true;
  3308.     [_obj_main] call IL_Init_Veh;
  3309.  
  3310.     _obj_main addAction [
  3311.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load cargo on TEMPEST</t>",
  3312.     {
  3313.         [_this select 0, IL_Supported_Cargo_NonVeh_TEMPEST] call IL_Do_Load;
  3314.     },[],IL_Action_LU_Priority,true,true,"",
  3315.     "(count(nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], IL_Supported_Cargo_NonVeh_TEMPEST, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3316.     ];
  3317.  
  3318.     _obj_main addAction [
  3319.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load vehicle on TEMPEST</t>",
  3320.     {
  3321.         [_this select 0, IL_Supported_Cargo_Veh_TEMPEST] call IL_Do_Load;
  3322.     },[],IL_Action_LU_Priority,true,true,"",
  3323.     "(count(nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], IL_Supported_Cargo_Veh_TEMPEST, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3324.     ];
  3325.  
  3326.     _obj_main addAction [
  3327.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">  Unload cargo from TEMPEST</t>",
  3328.     {
  3329.         [_this select 0] call IL_Do_Unload;
  3330.     },[],IL_Action_LU_Priority,false,true,"",
  3331.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  3332.     ];
  3333.     _obj_main addAction [
  3334.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3335.     {
  3336.         (_this select 0) setVariable["can_outside", true, true];;
  3337.     },[],IL_Action_S_Priority,false,true,"",
  3338.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3339.     ];
  3340.  
  3341.     _obj_main addAction [
  3342.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3343.     {
  3344.         (_this select 0) setVariable["can_outside", false, true];;
  3345.     },[],IL_Action_S_Priority,false,true,"",
  3346.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3347.     ];
  3348. };
  3349. if (_obj_main_type in IL_Supported_Vehicles_HEMTT) then
  3350. {
  3351.  
  3352.     _vsupported = true;
  3353.     [_obj_main] call IL_Init_Veh;
  3354.  
  3355.     _obj_main addAction [
  3356.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load cargo on HEMTT</t>",
  3357.     {
  3358.         [_this select 0, IL_Supported_Cargo_NonVeh_HEMTT] call IL_Do_Load;
  3359.     },[],IL_Action_LU_Priority,true,true,"",
  3360.     "(count(nearestObjects[ _target modelToWorld [0,-7 - (_target getVariable 'load_offset'),0], IL_Supported_Cargo_NonVeh_HEMTT, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-7 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3361.     ];
  3362.  
  3363.     _obj_main addAction [
  3364.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">  Load vehicle on HEMTT</t>",
  3365.     {
  3366.         [_this select 0, IL_Supported_Cargo_Veh_HEMTT] call IL_Do_Load;
  3367.     },[],IL_Action_LU_Priority,true,true,"",
  3368.     "(count(nearestObjects[ _target modelToWorld [0,-7 - (_target getVariable 'load_offset'),0], IL_Supported_Cargo_Veh_HEMTT, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-7 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3369.     ];
  3370.  
  3371.     _obj_main addAction [
  3372.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">  Unload cargo from HEMTT</t>",
  3373.     {
  3374.         [_this select 0] call IL_Do_Unload;
  3375.     },[],IL_Action_LU_Priority,false,true,"",
  3376.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-7 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  3377.     ];
  3378.  
  3379.     _obj_main addAction [
  3380.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3381.     {
  3382.         (_this select 0) setVariable["can_outside", true, true];;
  3383.     },[],IL_Action_S_Priority,false,true,"",
  3384.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3385.     ];
  3386.  
  3387.     _obj_main addAction [
  3388.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3389.     {
  3390.         (_this select 0) setVariable["can_outside", false, true];;
  3391.     },[],IL_Action_S_Priority,false,true,"",
  3392.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3393.     ];
  3394. };
  3395. if (_obj_main_type in IL_Supported_Vehicles_URAL_COVERED) then
  3396. {
  3397.  
  3398.     _vsupported = true;
  3399.     [_obj_main] call IL_Init_Veh;
  3400.  
  3401.     _obj_main addAction [
  3402.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">Load cargo on URAL</t>",
  3403.     {
  3404.         [_this select 0, IL_Supported_Cargo_NonVeh_URAL_COVERED] call IL_Do_Load;
  3405.     },[],IL_Action_O_Priority,true,true,"",
  3406.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_NonVeh_URAL_COVERED, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3407.     ];
  3408.  
  3409.     _obj_main addAction [
  3410.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">Load vehicle on URAL</t>",
  3411.     {
  3412.         [_this select 0, IL_Supported_Cargo_Veh_URAL_COVERED] call IL_Do_Load;
  3413.     },[],IL_Action_O_Priority,true,true,"",
  3414.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_Veh_URAL_COVERED, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3415.     ];
  3416.  
  3417.     _obj_main addAction [
  3418.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ffff00"">Unload cargo from URAL</t>",
  3419.     {
  3420.         [_this select 0] call IL_Do_Unload;
  3421.     },[],IL_Action_O_Priority,false,true,"",
  3422.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  3423.     ];
  3424.  
  3425.     _obj_main addAction [
  3426.     "<t color=""#33ff33"">Enable loading from outside</t>",
  3427.     {
  3428.         (_this select 0) setVariable["can_outside", true, true];;
  3429.     },[],IL_Action_S_Priority,false,true,"",
  3430.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3431.     ];
  3432.  
  3433.     _obj_main addAction [
  3434.     "<t color=""#ff4000"">Disable loading from outside</t>",
  3435.     {
  3436.         (_this select 0) setVariable["can_outside", false, true];;
  3437.     },[],IL_Action_S_Priority,false,true,"",
  3438.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3439.     ];
  3440. };
  3441. if (_obj_main_type in IL_Supported_Vehicles_URAL_OPEN) then
  3442. {
  3443.  
  3444.     _vsupported = true;
  3445.     [_obj_main] call IL_Init_Veh;
  3446.  
  3447.     _obj_main addAction [
  3448.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">Load cargo on URAL</t>",
  3449.     {
  3450.         [_this select 0, IL_Supported_Cargo_NonVeh_URAL_OPEN] call IL_Do_Load;
  3451.     },[],IL_Action_O_Priority,true,true,"",
  3452.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_NonVeh_URAL_OPEN, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3453.     ];
  3454.  
  3455.     _obj_main addAction [
  3456.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">Load vehicle on URAL</t>",
  3457.     {
  3458.         [_this select 0, IL_Supported_Cargo_Veh_URAL_OPEN] call IL_Do_Load;
  3459.     },[],IL_Action_O_Priority,true,true,"",
  3460.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_Veh_URAL_OPEN, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3461.     ];
  3462.  
  3463.     _obj_main addAction [
  3464.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ffff00"">Unload cargo from URAL</t>",
  3465.     {
  3466.         [_this select 0] call IL_Do_Unload;
  3467.     },[],IL_Action_O_Priority,false,true,"",
  3468.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  3469.     ];
  3470.  
  3471.     _obj_main addAction [
  3472.     "<t color=""#33ff33"">Enable loading from outside</t>",
  3473.     {
  3474.         (_this select 0) setVariable["can_outside", true, true];;
  3475.     },[],IL_Action_S_Priority,false,true,"",
  3476.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3477.     ];
  3478.  
  3479.     _obj_main addAction [
  3480.     "<t color=""#ff4000"">Disable loading from outside</t>",
  3481.     {
  3482.         (_this select 0) setVariable["can_outside", false, true];;
  3483.     },[],IL_Action_S_Priority,false,true,"",
  3484.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3485.     ];
  3486. };
  3487. if (_obj_main_type in IL_Supported_Vehicles_V3S) then
  3488. {
  3489.  
  3490.     _vsupported = true;
  3491.     [_obj_main] call IL_Init_Veh;
  3492.  
  3493.     _obj_main addAction [
  3494.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load cargo on V3S</t>",
  3495.     {
  3496.         [_this select 0, IL_Supported_Cargo_NonVeh_V3S] call IL_Do_Load;
  3497.     },[],IL_Action_LU_Priority,true,true,"",
  3498.     "(count(nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], IL_Supported_Cargo_NonVeh_V3S, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3499.     ];
  3500.  
  3501.     _obj_main addAction [
  3502.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load vehicle on V3S</t>",
  3503.     {
  3504.         [_this select 0, IL_Supported_Cargo_Veh_V3S] call IL_Do_Load;
  3505.     },[],IL_Action_LU_Priority,true,true,"",
  3506.     "(count(nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], IL_Supported_Cargo_Veh_V3S, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3507.     ];
  3508.  
  3509.     _obj_main addAction [
  3510.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">Unload cargo from V3S</t>",
  3511.     {
  3512.         [_this select 0] call IL_Do_Unload;
  3513.     },[],IL_Action_LU_Priority,false,true,"",
  3514.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-6.5 - (_target getVariable 'load_offset'),0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  3515.     ];
  3516.     _obj_main addAction [
  3517.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3518.     {
  3519.         (_this select 0) setVariable["can_outside", true, true];;
  3520.     },[],IL_Action_S_Priority,false,true,"",
  3521.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3522.     ];
  3523.  
  3524.     _obj_main addAction [
  3525.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3526.     {
  3527.         (_this select 0) setVariable["can_outside", false, true];;
  3528.     },[],IL_Action_S_Priority,false,true,"",
  3529.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3530.     ];
  3531. };
  3532. if (_obj_main_type in IL_Supported_Vehicles_BLACKFISH) then
  3533. {
  3534.  
  3535.     _vsupported = true;
  3536.     [_obj_main] call IL_Init_Veh;
  3537.  
  3538.     _obj_main addAction [
  3539.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load cargo on Blackfish</t>",
  3540.     {
  3541.         [_this select 0, IL_Supported_Cargo_NonVeh_BLACKFISH] call IL_Do_Load;
  3542.     },[],IL_Action_LU_Priority,true,true,"",
  3543.     "(count(nearestObjects[ _target modelToWorld [0,-9,-5.4], IL_Supported_Cargo_NonVeh_BLACKFISH, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' == 1)"
  3544.     ];
  3545.  
  3546.     _obj_main addAction [
  3547.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load vehicle on Blackfish</t>",
  3548.     {
  3549.         [_this select 0, IL_Supported_Cargo_Veh_BLACKFISH] call IL_Do_Load;
  3550.     },[],IL_Action_LU_Priority,true,true,"",
  3551.     "(count(nearestObjects[ _target modelToWorld [0,-9,-5.4], IL_Supported_Cargo_Veh_BLACKFISH, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' == 1)"
  3552.     ];
  3553.  
  3554.     _obj_main addAction [
  3555.     "<t color=""#007f0e"">Get in Blackfish</t>",
  3556.     {
  3557.         (_this select 1) moveInCargo (_this select 0);
  3558.     },[],IL_Action_LU_Priority,false,true,"",
  3559.     "(_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' > 0.43) && (_target getVariable 'usable_ramp')"
  3560.     ];
  3561.  
  3562.     _obj_main addAction [
  3563.     "<t color=""#ff0000"">Get out Blackfish</t>",
  3564.     {
  3565.         [_this select 0, _this select 1, false] call IL_GetOut;
  3566.     },[],IL_Action_LU_Priority,false,true,"",
  3567.     "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' > 0.43) && (_target getVariable 'usable_ramp')"
  3568.     ];
  3569.  
  3570.     _obj_main addAction [
  3571.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Eject</t>",
  3572.     {
  3573.         [_this select 0, _this select 1, true] call IL_GetOut;
  3574.     },[],IL_Action_LU_Priority,false,true,"",
  3575.     "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (((getPosATL _target) select 2) >= IL_Para_Jump_ATL) && (_target doorPhase 'Door_1_source' > 0.43) && (_target getVariable 'usable_ramp')"
  3576.     ];
  3577.  
  3578.     _obj_main addAction [
  3579.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">Unload cargo from Blackfish</t>",
  3580.     {
  3581.         [_this select 0] call IL_Do_Unload;
  3582.     },[],IL_Action_LU_Priority,false,true,"",
  3583.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' == 1)"
  3584.     ];
  3585.  
  3586.     _obj_main addAction [
  3587.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Unload cargo with parachute</t>",
  3588.     {
  3589.         [_this select 0, true] call IL_Do_Unload;
  3590.     },[],IL_Action_LU_Priority,false,true,"",
  3591.     "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target doorPhase 'Door_1_source' == 1)"
  3592.     ];
  3593.  
  3594.     _obj_main addAction [
  3595.     "<img image='IgiLoad\images\unload_all_para.paa' /><t color=""#a50b00"">Unload ALL cargo with parachute</t>",
  3596.     {
  3597.         while {((_this select 0) getVariable "box_num") != 0} do
  3598.         {
  3599.             [_this select 0, true] call IL_Do_Unload;
  3600.         };
  3601.     },[],IL_Action_LU_Priority,false,true,"",
  3602.     "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target doorPhase 'Door_1_source' == 1)"
  3603.     ];
  3604.  
  3605.     _obj_main addAction [
  3606.     "<t color=""#0000ff"">Open cargo ramp on Blackfish</t>",
  3607.     {
  3608.         _this select 0 animatedoor ['Door_1_source', 1];
  3609.     },[],IL_Action_O_Priority,false,true,"",
  3610.     "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target doorPhase 'Door_1_source' == 0) && (_target getVariable 'can_load')"
  3611.     ];
  3612.  
  3613.     _obj_main addAction [
  3614.     "<t color=""#0000ff"">Close cargo ramp on Blackfish</t>",
  3615.     {
  3616.         _this select 0 animatedoor ['Door_1_source', 0];
  3617.     },[],IL_Action_O_Priority,false,true,"",
  3618.     "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-5.4], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target doorPhase 'Door_1_source' == 1) && (_target getVariable 'can_load')"
  3619.     ];
  3620.  
  3621.     _obj_main addAction [
  3622.     "<t color=""#0000ff"">Enable loading for Co-Pilot</t>",
  3623.     {
  3624.         (_this select 0) setVariable["can_copilot", true, true];;
  3625.     },[],IL_Action_S_Priority,false,true,"",
  3626.     "((driver _target == _this) && !(_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3627.     ];
  3628.  
  3629.     _obj_main addAction [
  3630.     "<t color=""#0000ff"">Disable loading for Co-Pilot</t>",
  3631.     {
  3632.         (_this select 0) setVariable["can_copilot", false, true];;
  3633.     },[],IL_Action_S_Priority,false,true,"",
  3634.     "((driver _target == _this) && (_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3635.     ];
  3636.  
  3637.     _obj_main addAction [
  3638.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3639.     {
  3640.         (_this select 0) setVariable["can_outside", true, true];;
  3641.     },[],IL_Action_S_Priority,false,true,"",
  3642.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3643.     ];
  3644.  
  3645.     _obj_main addAction [
  3646.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3647.     {
  3648.         (_this select 0) setVariable["can_outside", false, true];;
  3649.     },[],IL_Action_S_Priority,false,true,"",
  3650.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3651.     ];
  3652.  
  3653.     _obj_main addAction [
  3654.     "<t color=""#0000ff"">Enable usable ramp</t>",
  3655.     {
  3656.         (_this select 0) setVariable["usable_ramp", true, true];;
  3657.     },[],IL_Action_S_Priority,false,true,"",
  3658.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'usable_ramp') && IL_Ramp)"
  3659.     ];
  3660.  
  3661.     _obj_main addAction [
  3662.     "<t color=""#0000ff"">Disable usable ramp</t>",
  3663.     {
  3664.         (_this select 0) setVariable["usable_ramp", false, true];;
  3665.     },[],IL_Action_S_Priority,false,true,"",
  3666.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'usable_ramp') && IL_Ramp)"
  3667.     ];
  3668. };
  3669. if (_obj_main_type in IL_Supported_Vehicles_Y32) then
  3670. {
  3671.  
  3672.     _vsupported = true;
  3673.     [_obj_main] call IL_Init_Veh;
  3674.  
  3675.     _obj_main addAction [
  3676.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load cargo in Y-32 Xian</t>",
  3677.     {
  3678.         [_this select 0, IL_Supported_Cargo_NonVeh_Y32] call IL_Do_Load;
  3679.     },[],IL_Action_LU_Priority,true,true,"",
  3680.     "(count(nearestObjects[ _target modelToWorld [0,-6.5,-2.5], IL_Supported_Cargo_NonVeh_Y32, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6.5,-2.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' == 1)"
  3681.     ];
  3682.  
  3683.     _obj_main addAction [
  3684.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load vehicle in Y-32 Xi'an</t>",
  3685.     {
  3686.         [_this select 0, IL_Supported_Cargo_Veh_Y32] call IL_Do_Load;
  3687.     },[],IL_Action_LU_Priority,true,true,"",
  3688.     "(count(nearestObjects[ _target modelToWorld [0,-6.5,-2.5], IL_Supported_Cargo_Veh_Y32, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6.5,-2.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' == 1)"
  3689.     ];
  3690.  
  3691.     _obj_main addAction [
  3692.     "<t color=""#007f0e"">Get in Y-32 Xian</t>",
  3693.     {
  3694.         (_this select 1) moveInCargo (_this select 0);
  3695.     },[],IL_Action_LU_Priority,false,true,"",
  3696.     "(_this in (nearestObjects[ _target modelToWorld [0,-6.5,-2.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' > 0.43) && (_target getVariable 'usable_ramp')"
  3697.     ];
  3698.  
  3699.     _obj_main addAction [
  3700.     "<t color=""#ff0000"">Get out Y-32 Xian</t>",
  3701.     {
  3702.         [_this select 0, _this select 1, false] call IL_GetOut;
  3703.     },[],IL_Action_LU_Priority,false,true,"",
  3704.     "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' > 0.43) && (_target getVariable 'usable_ramp')"
  3705.     ];
  3706.  
  3707.     _obj_main addAction [
  3708.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Eject</t>",
  3709.     {
  3710.         [_this select 0, _this select 1, true] call IL_GetOut;
  3711.     },[],IL_Action_LU_Priority,false,true,"",
  3712.     "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (((getPosATL _target) select 2) >= IL_Para_Jump_ATL) && (_target doorPhase 'Door_1_source' > 0.43) && (_target getVariable 'usable_ramp')"
  3713.     ];
  3714.  
  3715.     _obj_main addAction [
  3716.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">Unload cargo from Y-32 Xian</t>",
  3717.     {
  3718.         [_this select 0] call IL_Do_Unload;
  3719.     },[],IL_Action_LU_Priority,false,true,"",
  3720.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6.5,-2.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_1_source' == 1)"
  3721.     ];
  3722.  
  3723.     _obj_main addAction [
  3724.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Unload cargo with parachute</t>",
  3725.     {
  3726.         [_this select 0, true] call IL_Do_Unload;
  3727.     },[],IL_Action_LU_Priority,false,true,"",
  3728.     "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target doorPhase 'Door_1_source' == 1)"
  3729.     ];
  3730.  
  3731.     _obj_main addAction [
  3732.     "<img image='IgiLoad\images\unload_all_para.paa' /><t color=""#a50b00"">Unload ALL cargo with parachute</t>",
  3733.     {
  3734.         while {((_this select 0) getVariable "box_num") != 0} do
  3735.         {
  3736.             [_this select 0, true] call IL_Do_Unload;
  3737.         };
  3738.     },[],IL_Action_LU_Priority,false,true,"",
  3739.     "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target doorPhase 'Door_1_source' == 1)"
  3740.     ];
  3741.  
  3742.     _obj_main addAction [
  3743.     "<t color=""#0000ff"">Open cargo ramp on Y-32 Xian</t>",
  3744.     {
  3745.         _this select 0 animatedoor ['Door_1_source', 1];
  3746.     },[],IL_Action_O_Priority,false,true,"",
  3747.     "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6.5,-2.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target doorPhase 'Door_1_source' == 0) && (_target getVariable 'can_load')"
  3748.     ];
  3749.  
  3750.     _obj_main addAction [
  3751.     "<t color=""#0000ff"">Close cargo ramp on Y-32 Xian</t>",
  3752.     {
  3753.         _this select 0 animatedoor ['Door_1_source', 0];
  3754.     },[],IL_Action_O_Priority,false,true,"",
  3755.     "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-6.5,-2.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target doorPhase 'Door_1_source' == 1) && (_target getVariable 'can_load')"
  3756.     ];
  3757.  
  3758.     _obj_main addAction [
  3759.     "<t color=""#0000ff"">Enable loading for Co-Pilot</t>",
  3760.     {
  3761.         (_this select 0) setVariable["can_copilot", true, true];;
  3762.     },[],IL_Action_S_Priority,false,true,"",
  3763.     "((driver _target == _this) && !(_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3764.     ];
  3765.  
  3766.     _obj_main addAction [
  3767.     "<t color=""#0000ff"">Disable loading for Co-Pilot</t>",
  3768.     {
  3769.         (_this select 0) setVariable["can_copilot", false, true];;
  3770.     },[],IL_Action_S_Priority,false,true,"",
  3771.     "((driver _target == _this) && (_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3772.     ];
  3773.  
  3774.     _obj_main addAction [
  3775.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3776.     {
  3777.         (_this select 0) setVariable["can_outside", true, true];;
  3778.     },[],IL_Action_S_Priority,false,true,"",
  3779.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3780.     ];
  3781.  
  3782.     _obj_main addAction [
  3783.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3784.     {
  3785.         (_this select 0) setVariable["can_outside", false, true];;
  3786.     },[],IL_Action_S_Priority,false,true,"",
  3787.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3788.     ];
  3789.  
  3790.     _obj_main addAction [
  3791.     "<t color=""#0000ff"">Enable usable ramp</t>",
  3792.     {
  3793.         (_this select 0) setVariable["usable_ramp", true, true];;
  3794.     },[],IL_Action_S_Priority,false,true,"",
  3795.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'usable_ramp') && IL_Ramp)"
  3796.     ];
  3797.  
  3798.     _obj_main addAction [
  3799.     "<t color=""#0000ff"">Disable usable ramp</t>",
  3800.     {
  3801.         (_this select 0) setVariable["usable_ramp", false, true];;
  3802.     },[],IL_Action_S_Priority,false,true,"",
  3803.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'usable_ramp') && IL_Ramp)"
  3804.     ];
  3805. };
  3806. if (_obj_main_type in IL_Supported_Vehicles_HURON) then
  3807. {
  3808.  
  3809.     _vsupported = true;
  3810.     [_obj_main] call IL_Init_Veh;
  3811.  
  3812.     _obj_main addAction [
  3813.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load cargo in CH-67 Huron</t>",
  3814.     {
  3815.         [_this select 0, IL_Supported_Cargo_NonVeh_HURON] call IL_Do_Load;
  3816.     },[],IL_Action_LU_Priority,true,true,"",
  3817.     "(count(nearestObjects[ _target modelToWorld [0,-9,-4.5], IL_Supported_Cargo_NonVeh_HURON, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-4.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'door_rear_source' == 1)"
  3818.     ];
  3819.  
  3820.     _obj_main addAction [
  3821.     "<img image='IgiLoad\images\load.paa' /><t color=""#007f0e"">Load vehicle in CH-67 Huron</t>",
  3822.     {
  3823.         [_this select 0, IL_Supported_Cargo_Veh_HURON] call IL_Do_Load;
  3824.     },[],IL_Action_LU_Priority,true,true,"",
  3825.     "(count(nearestObjects[ _target modelToWorld [0,-9,-4.5], IL_Supported_Cargo_Veh_HURON, IL_SDistL + IL_SDistL_Heli_offset]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-4.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load') && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'door_rear_source' == 1)"
  3826.     ];
  3827.  
  3828.     _obj_main addAction [
  3829.     "<t color=""#007f0e"">Get in CH-67 Huron Ride in back</t>",
  3830.     {
  3831.         (_this select 1) moveInCargo (_this select 0);
  3832.     },[],IL_Action_LU_Priority,false,true,"",
  3833.     "(_this in (nearestObjects[ _target modelToWorld [0,-9,-4.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && ((_target emptyPositions 'cargo') > 0) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target animationPhase 'Door_rear_source' > 0.43) && (_target getVariable 'usable_ramp')"
  3834.     ];
  3835.  
  3836.     _obj_main addAction [
  3837.     "<t color=""#ff0000"">Get out CH-67 Huron</t>",
  3838.     {
  3839.         [_this select 0, _this select 1, false] call IL_GetOut;
  3840.     },[],IL_Action_LU_Priority,false,true,"",
  3841.     "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_rear_source' > 0.43) && (_target getVariable 'usable_ramp')"
  3842.     ];
  3843.  
  3844.     _obj_main addAction [
  3845.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Eject</t>",
  3846.     {
  3847.         [_this select 0, _this select 1, true] call IL_GetOut;
  3848.     },[],IL_Action_LU_Priority,false,true,"",
  3849.     "('cargo' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (((getPosATL _target) select 2) >= IL_Para_Jump_ATL) && (_target doorPhase 'Door_rear_source' > 0.43) && (_target getVariable 'usable_ramp')"
  3850.     ];
  3851.  
  3852.     _obj_main addAction [
  3853.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ff0000"">Unload cargo from CH-67 Huron</t>",
  3854.     {
  3855.         [_this select 0] call IL_Do_Unload;
  3856.     },[],IL_Action_LU_Priority,false,true,"",
  3857.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (IL_Can_Inside && ('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-4.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed) && (((getPos _target) select 2) <= IL_LU_Alt) && (_target doorPhase 'Door_rear_source' == 1)"
  3858.     ];
  3859.  
  3860.     _obj_main addAction [
  3861.     "<img image='IgiLoad\images\unload_para.paa' /><t color=""#b200ff"">Unload cargo with parachute</t>",
  3862.     {
  3863.         [_this select 0, true] call IL_Do_Unload;
  3864.     },[],IL_Action_LU_Priority,false,true,"",
  3865.     "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target doorPhase 'Door_rear_source' == 1)"
  3866.     ];
  3867.  
  3868.     _obj_main addAction [
  3869.     "<img image='IgiLoad\images\unload_all_para.paa' /><t color=""#a50b00"">Unload ALL cargo with parachute</t>",
  3870.     {
  3871.         while {((_this select 0) getVariable "box_num") != 0} do
  3872.         {
  3873.             [_this select 0, true] call IL_Do_Unload;
  3874.         };
  3875.     },[],IL_Action_LU_Priority,false,true,"",
  3876.     "(_target getVariable 'box_num' < 0) && ((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_load') && (((getPosATL _target) select 2) >= IL_Para_Drop_ATL) && (_target doorPhase 'Door_rear_source' == 1)"
  3877.     ];
  3878.  
  3879.     _obj_main addAction [
  3880.     "<t color=""#0000ff"">Open cargo ramp on CH-67 Huron</t>",
  3881.     {
  3882.         _this select 0 animateDoor  ['Door_rear_source', 1];
  3883.     },[],IL_Action_O_Priority,false,true,"",
  3884.     "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-4.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target doorPhase 'Door_rear_source' == 0) && (_target getVariable 'can_load')"
  3885.     ];
  3886.  
  3887.     _obj_main addAction [
  3888.     "<t color=""#0000ff"">Close cargo ramp on CH-67 Huron</t>",
  3889.     {
  3890.         _this select 0 animateDoor  ['Door_rear_source', 0];
  3891.     },[],IL_Action_O_Priority,false,true,"",
  3892.     "((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot')) || ((_this in (nearestObjects[ _target modelToWorld [0,-9,-4.5], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside'))) && (_target doorPhase 'Door_rear_source' == 1) && (_target getVariable 'can_load')"
  3893.     ];
  3894.  
  3895.     _obj_main addAction [
  3896.     "<t color=""#0000ff"">Enable loading for Co-Pilot</t>",
  3897.     {
  3898.         (_this select 0) setVariable["can_copilot", true, true];;
  3899.     },[],IL_Action_S_Priority,false,true,"",
  3900.     "((driver _target == _this) && !(_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3901.     ];
  3902.  
  3903.     _obj_main addAction [
  3904.     "<t color=""#0000ff"">Disable loading for Co-Pilot</t>",
  3905.     {
  3906.         (_this select 0) setVariable["can_copilot", false, true];;
  3907.     },[],IL_Action_S_Priority,false,true,"",
  3908.     "((driver _target == _this) && (_target getVariable 'can_copilot') && IL_Can_CoPilot)"
  3909.     ];
  3910.  
  3911.     _obj_main addAction [
  3912.     "<t color=""#0000ff"">Enable loading from outside</t>",
  3913.     {
  3914.         (_this select 0) setVariable["can_outside", true, true];;
  3915.     },[],IL_Action_S_Priority,false,true,"",
  3916.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3917.     ];
  3918.  
  3919.     _obj_main addAction [
  3920.     "<t color=""#0000ff"">Disable loading from outside</t>",
  3921.     {
  3922.         (_this select 0) setVariable["can_outside", false, true];;
  3923.     },[],IL_Action_S_Priority,false,true,"",
  3924.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3925.     ];
  3926.  
  3927.     _obj_main addAction [
  3928.     "<t color=""#0000ff"">Enable usable ramp</t>",
  3929.     {
  3930.         (_this select 0) setVariable["usable_ramp", true, true];;
  3931.     },[],IL_Action_S_Priority,false,true,"",
  3932.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && !(_target getVariable 'usable_ramp') && IL_Ramp)"
  3933.     ];
  3934.  
  3935.     _obj_main addAction [
  3936.     "<t color=""#0000ff"">Disable usable ramp</t>",
  3937.     {
  3938.         (_this select 0) setVariable["usable_ramp", false, true];;
  3939.     },[],IL_Action_S_Priority,false,true,"",
  3940.     "(((driver _target == _this) || (('Turret' in (assignedVehicleRole _this)) && (vehicle _this == _target) && (_target getVariable 'can_copilot'))) && (_target getVariable 'usable_ramp') && IL_Ramp)"
  3941.     ];
  3942. };
  3943.  
  3944. if (_obj_main_type in IL_Supported_Vehicles_HUNTER) then
  3945. {
  3946.  
  3947.     _vsupported = true;
  3948.     [_obj_main] call IL_Init_Veh;
  3949.  
  3950.     _obj_main addAction [
  3951.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">Load cargo on HUNTER</t>",
  3952.     {
  3953.         [_this select 0, IL_Supported_Cargo_NonVeh_HUNTER] call IL_Do_Load;
  3954.     },[],IL_Action_O_Priority,true,true,"",
  3955.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_NonVeh_HUNTER, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3956.     ];
  3957.  
  3958.     _obj_main addAction [
  3959.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ffff00"">Unload cargo from HUNTER</t>",
  3960.     {
  3961.         [_this select 0] call IL_Do_Unload;
  3962.     },[],IL_Action_O_Priority,false,true,"",
  3963.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  3964.     ];
  3965.  
  3966.     _obj_main addAction [
  3967.     "<t color=""#33ff33"">Enable loading from outside</t>",
  3968.     {
  3969.         (_this select 0) setVariable["can_outside", true, true];;
  3970.     },[],IL_Action_S_Priority,false,true,"",
  3971.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  3972.     ];
  3973.  
  3974.     _obj_main addAction [
  3975.     "<t color=""#ff4000"">Disable loading from outside</t>",
  3976.     {
  3977.         (_this select 0) setVariable["can_outside", false, true];;
  3978.     },[],IL_Action_S_Priority,false,true,"",
  3979.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  3980.     ];
  3981. };
  3982. if (_obj_main_type in IL_Supported_Vehicles_IFRIT) then
  3983. {
  3984.  
  3985.     _vsupported = true;
  3986.     [_obj_main] call IL_Init_Veh;
  3987.  
  3988.     _obj_main addAction [
  3989.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">Load cargo on IFRIT</t>",
  3990.     {
  3991.         [_this select 0, IL_Supported_Cargo_NonVeh_IFRIT] call IL_Do_Load;
  3992.     },[],IL_Action_O_Priority,true,true,"",
  3993.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_NonVeh_IFRIT, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  3994.     ];
  3995.  
  3996.     _obj_main addAction [
  3997.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ffff00"">Unload cargo from IFRIT</t>",
  3998.     {
  3999.         [_this select 0] call IL_Do_Unload;
  4000.     },[],IL_Action_O_Priority,false,true,"",
  4001.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  4002.     ];
  4003.  
  4004.     _obj_main addAction [
  4005.     "<t color=""#33ff33"">Enable loading from outside</t>",
  4006.     {
  4007.         (_this select 0) setVariable["can_outside", true, true];;
  4008.     },[],IL_Action_S_Priority,false,true,"",
  4009.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  4010.     ];
  4011.  
  4012.     _obj_main addAction [
  4013.     "<t color=""#ff4000"">Disable loading from outside</t>",
  4014.     {
  4015.         (_this select 0) setVariable["can_outside", false, true];;
  4016.     },[],IL_Action_S_Priority,false,true,"",
  4017.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  4018.     ];
  4019. };
  4020. if (_obj_main_type in IL_Supported_Vehicles_STRIDER) then
  4021. {
  4022.  
  4023.     _vsupported = true;
  4024.     [_obj_main] call IL_Init_Veh;
  4025.  
  4026.     _obj_main addAction [
  4027.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">Load cargo on STRIDER</t>",
  4028.     {
  4029.         [_this select 0, IL_Supported_Cargo_NonVeh_STRIDER] call IL_Do_Load;
  4030.     },[],IL_Action_O_Priority,true,true,"",
  4031.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_NonVeh_STRIDER, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  4032.     ];
  4033.  
  4034.     _obj_main addAction [
  4035.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ffff00"">Unload cargo from STRIDER</t>",
  4036.     {
  4037.         [_this select 0] call IL_Do_Unload;
  4038.     },[],IL_Action_O_Priority,false,true,"",
  4039.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  4040.     ];
  4041.  
  4042.     _obj_main addAction [
  4043.     "<t color=""#33ff33"">Enable loading from outside</t>",
  4044.     {
  4045.         (_this select 0) setVariable["can_outside", true, true];;
  4046.     },[],IL_Action_S_Priority,false,true,"",
  4047.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  4048.     ];
  4049.  
  4050.     _obj_main addAction [
  4051.     "<t color=""#ff4000"">Disable loading from outside</t>",
  4052.     {
  4053.         (_this select 0) setVariable["can_outside", false, true];;
  4054.     },[],IL_Action_S_Priority,false,true,"",
  4055.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  4056.     ];
  4057. };
  4058. if (_obj_main_type in IL_Supported_Vehicles_LANDROVER) then
  4059. {
  4060.  
  4061.     _vsupported = true;
  4062.     [_obj_main] call IL_Init_Veh;
  4063.  
  4064.     _obj_main addAction [
  4065.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">  Load cargo on LANDROVER</t>",
  4066.     {
  4067.         [_this select 0, IL_Supported_Cargo_NonVeh_LANDROVER] call IL_Do_Load;
  4068.     },[],IL_Action_O_Priority,true,true,"",
  4069.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_NonVeh_LANDROVER, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  4070.     ];
  4071.  
  4072.     _obj_main addAction [
  4073.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">  Load vehicle on LANDROVER</t>",
  4074.     {
  4075.         [_this select 0, IL_Supported_Cargo_Veh_LANDROVER] call IL_Do_Load;
  4076.     },[],IL_Action_O_Priority,true,true,"",
  4077.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_Veh_LANDROVER, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  4078.     ];
  4079.  
  4080.     _obj_main addAction [
  4081.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ffff00"">  Unload cargo from LANDROVER</t>",
  4082.     {
  4083.         [_this select 0] call IL_Do_Unload;
  4084.     },[],IL_Action_O_Priority,false,true,"",
  4085.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  4086.     ];
  4087.  
  4088.     _obj_main addAction [
  4089.     "<t color=""#33ff33"">Enable loading from outside</t>",
  4090.     {
  4091.         (_this select 0) setVariable["can_outside", true, true];;
  4092.     },[],IL_Action_S_Priority,false,true,"",
  4093.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  4094.     ];
  4095.  
  4096.     _obj_main addAction [
  4097.     "<t color=""#ff4000"">Disable loading from outside</t>",
  4098.     {
  4099.         (_this select 0) setVariable["can_outside", false, true];;
  4100.     },[],IL_Action_S_Priority,false,true,"",
  4101.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  4102.     ];
  4103. };
  4104. if (_obj_main_type in IL_Supported_Vehicles_AMBULANCE) then
  4105. {
  4106.  
  4107.     _vsupported = true;
  4108.     [_obj_main] call IL_Init_Veh;
  4109.  
  4110.     _obj_main addAction [
  4111.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">  Load cargo on AMBULANCE</t>",
  4112.     {
  4113.         [_this select 0, IL_Supported_Cargo_NonVeh_AMBULANCE] call IL_Do_Load;
  4114.     },[],IL_Action_O_Priority,true,true,"",
  4115.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_NonVeh_AMBULANCE, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  4116.     ];
  4117.  
  4118.     _obj_main addAction [
  4119.     "<img image='IgiLoad\images\load.paa' /><t color=""#ffff00"">  Load vehicle on AMBULANCE</t>",
  4120.     {
  4121.         [_this select 0, IL_Supported_Cargo_Veh_AMBULANCE] call IL_Do_Load;
  4122.     },[],IL_Action_O_Priority,true,true,"",
  4123.     "(count(nearestObjects[ _target modelToWorld [0,-4.5,0], IL_Supported_Cargo_Veh_AMBULANCE, IL_SDistL]) > 0) && (abs(speed _target) <= IL_LU_Speed) && ((IL_Can_Inside && (driver _target == _this)) || ((((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset]))) && (_target getVariable 'can_outside')))) && (_target getVariable 'box_num' > _target getVariable 'slots_num') && (_target getVariable 'can_load')"
  4124.     ];
  4125.  
  4126.     _obj_main addAction [
  4127.     "<img image='IgiLoad\images\unload.paa' /><t color=""#ffff00"">  Unload cargo from AMBULANCE</t>",
  4128.     {
  4129.         [_this select 0] call IL_Do_Unload;
  4130.     },[],IL_Action_O_Priority,false,true,"",
  4131.     "(_target getVariable 'box_num' < 0) && ((IL_Can_Inside && (driver _target == _this)) || (((_this in (nearestObjects[ _target modelToWorld [0,-4.5,0], [], IL_SDistL + IL_SDistL_Heli_offset])) && (_target getVariable 'can_outside')))) && (_target getVariable 'can_load') && (abs(speed _target) <= IL_LU_Speed)"
  4132.     ];
  4133.  
  4134.     _obj_main addAction [
  4135.     "<t color=""#33ff33"">Enable loading from outside</t>",
  4136.     {
  4137.         (_this select 0) setVariable["can_outside", true, true];;
  4138.     },[],IL_Action_S_Priority,false,true,"",
  4139.     "((driver _target == _this) && !(_target getVariable 'can_outside') && IL_Can_Outside)"
  4140.     ];
  4141.  
  4142.     _obj_main addAction [
  4143.     "<t color=""#ff4000"">Disable loading from outside</t>",
  4144.     {
  4145.         (_this select 0) setVariable["can_outside", false, true];;
  4146.     },[],IL_Action_S_Priority,false,true,"",
  4147.     "((driver _target == _this) && (_target getVariable 'can_outside') && IL_Can_Outside)"
  4148.     ];
  4149. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement