Advertisement
streupfeffer

XENO Taru Scriptversion

Jan 8th, 2016
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 19.69 KB | None | 0 0
  1. /*
  2. Originaly by Norx_Aengel
  3. Script from Xeno Taru Mod: https://forums.bistudio.com/topic/176049-xeno-taru-pod-mod/
  4.  
  5. Taru Helicopter
  6. Nato Black                              IND Black
  7. JNS_Skycrane_BLU_Black                  JNS_Skycrane_IND_Black
  8. Nato Green                              IND Green
  9. JNS_Skycrane_BLU_Green                  JNS_Skycrane_IND_Black
  10. Nato Grey                               IND Grey
  11. JNS_Skycrane_BLU_Grey                   JNS_Skycrane_IND_Grey
  12.  
  13. Botched by zebra1993 (just tested in Editor)
  14. - Added the JNS Skycrane implementation by jonpas https://forums.bistudio.com/topic/176249-jns-skycranes/
  15. - Changed some code due to the problem that the pod is not lowered when detached from Taru (see Forum) patched the problem when the line with the lowering was comented out.
  16. The vinche doesen't have now sound when used by this script. Deal with it :-D
  17. Thanks for Making this Script Norx
  18. */
  19. waitUntil {!isNull player};
  20.  
  21. #include "\a3\editor_f\Data\Scripts\dikCodes.h"
  22.  
  23. Script_Taru =
  24. {
  25.     if (isClass(configFile >> "CfgPatches" >> "cba_main")) then
  26.     {
  27.         ["XENO Taru Pod Mod", "Taru_Arrimer",localize "STR_XENO_Arrimer", {["Arrimage", player] call Script_Choix_Unite;}, {}, [DIK_A, [true,false,false]]] call CBA_fnc_addKeybind;
  28.         ["XENO Taru Pod Mod", "Taru_Desarrimer",localize "STR_XENO_Desarrimer", {["Desarrimage", player] call Script_Choix_Unite;}, {}, [DIK_E,[true,false,false]]] call CBA_fnc_addKeybind;
  29.         ["XENO Taru Pod Mod", "Taru_Larguer",localize "STR_XENO_Larguer", {["Largage", player] call Script_Choix_Unite;}, {},[DIK_C,[true,false,false]]] call CBA_fnc_addKeybind;
  30.     };
  31.  
  32.     if (isClass(configFile >> "CfgPatches" >> "ace_common")) then
  33.     {
  34.         _taru_Arrimer = ["Taru_Arrimer",localize "STR_XENO_Arrimer","Script_XENO_Taru_Pod\XENO_Pod.paa",{["Arrimage", player] call Script_Choix_Unite;},{[vehicle player] call Script_Verification_Pod and {!([vehicle player] call Script_Verification_Objet_Attacher)}}] call ace_interact_menu_fnc_createAction;
  35.         ["O_Heli_Transport_04_F", 1, ["ACE_SelfActions"], _taru_Arrimer] call ace_interact_menu_fnc_addActionToClass;
  36.         ["JNS_Skycrane_BLU_Black", 1, ["ACE_SelfActions"], _taru_Arrimer] call ace_interact_menu_fnc_addActionToClass;
  37.         ["JNS_Skycrane_BLU_Green", 1, ["ACE_SelfActions"], _taru_Arrimer] call ace_interact_menu_fnc_addActionToClass;
  38.         ["JNS_Skycrane_BLU_Grey", 1, ["ACE_SelfActions"], _taru_Arrimer] call ace_interact_menu_fnc_addActionToClass;
  39.         ["JNS_Skycrane_IND_Black", 1, ["ACE_SelfActions"], _taru_Arrimer] call ace_interact_menu_fnc_addActionToClass;     
  40.         ["JNS_Skycrane_IND_Green", 1, ["ACE_SelfActions"], _taru_Arrimer] call ace_interact_menu_fnc_addActionToClass;
  41.         ["JNS_Skycrane_IND_Grey", 1, ["ACE_SelfActions"], _taru_Arrimer] call ace_interact_menu_fnc_addActionToClass;
  42.  
  43.         _taru_Desarrimer = ["Taru_Desarrimer",localize "STR_XENO_Desarrimer","Script_XENO_Taru_Pod\XENO_Pod.paa",{["Desarrimage", player] call Script_Choix_Unite;},{[vehicle player] call Script_Verification_Objet_Attacher}] call ace_interact_menu_fnc_createAction;
  44.         ["O_Heli_Transport_04_F", 1, ["ACE_SelfActions"], _taru_Desarrimer] call ace_interact_menu_fnc_addActionToClass;
  45.         ["JNS_Skycrane_BLU_Black", 1, ["ACE_SelfActions"], _taru_Desarrimer] call ace_interact_menu_fnc_addActionToClass;
  46.         ["JNS_Skycrane_BLU_Green", 1, ["ACE_SelfActions"], _taru_Desarrimer] call ace_interact_menu_fnc_addActionToClass;
  47.         ["JNS_Skycrane_BLU_Grey", 1, ["ACE_SelfActions"], _taru_Desarrimer] call ace_interact_menu_fnc_addActionToClass;
  48.         ["JNS_Skycrane_IND_Black", 1, ["ACE_SelfActions"], _taru_Desarrimer] call ace_interact_menu_fnc_addActionToClass;
  49.         ["JNS_Skycrane_IND_Green", 1, ["ACE_SelfActions"], _taru_Desarrimer] call ace_interact_menu_fnc_addActionToClass;
  50.         ["JNS_Skycrane_IND_Grey", 1, ["ACE_SelfActions"], _taru_Desarrimer] call ace_interact_menu_fnc_addActionToClass;
  51.        
  52.         _taru_Larguer = ["Taru_Larguer",localize "STR_XENO_Larguer","Script_XENO_Taru_Pod\XENO_Pod.paa",{["Largage", player] call Script_Choix_Unite;},{[vehicle player] call Script_Verification_Objet_Attacher}] call ace_interact_menu_fnc_createAction;
  53.         ["O_Heli_Transport_04_F", 1, ["ACE_SelfActions"], _taru_Larguer] call ace_interact_menu_fnc_addActionToClass;
  54.         ["JNS_Skycrane_BLU_Black", 1, ["ACE_SelfActions"], _taru_Larguer] call ace_interact_menu_fnc_addActionToClass;
  55.         ["JNS_Skycrane_BLU_Green", 1, ["ACE_SelfActions"], _taru_Larguer] call ace_interact_menu_fnc_addActionToClass; 
  56.         ["JNS_Skycrane_BLU_Grey", 1, ["ACE_SelfActions"], _taru_Larguer] call ace_interact_menu_fnc_addActionToClass;
  57.         ["JNS_Skycrane_IND_Black", 1, ["ACE_SelfActions"], _taru_Larguer] call ace_interact_menu_fnc_addActionToClass;
  58.         ["JNS_Skycrane_IND_Green", 1, ["ACE_SelfActions"], _taru_Larguer] call ace_interact_menu_fnc_addActionToClass; 
  59.         ["JNS_Skycrane_IND_Grey", 1, ["ACE_SelfActions"], _taru_Larguer] call ace_interact_menu_fnc_addActionToClass;
  60.     };
  61.  
  62.     [] spawn Script_Boucle_Ajout_Action_Groupe;
  63. };
  64.  
  65. Script_Boucle_Ajout_Action_Groupe =
  66. {
  67.     _ace_activer = false;
  68.  
  69.     waituntil
  70.     {
  71.         {
  72.             if (isClass(configFile >> "CfgPatches" >> "ace_common")) then
  73.             {
  74.                 _ace_activer = true;
  75.             };
  76.  
  77.             if (_x != player or {!_ace_activer}) then
  78.             {
  79.                 if (isnil {_x getVariable "Variable_Action_Init"}) then
  80.                 {
  81.                     _x setVariable ["Variable_Action_Init",false,false];
  82.                 };
  83.  
  84.                 if (!(_x getVariable "Variable_Action_Init")) then
  85.                 {
  86.                     _x setVariable ["Variable_Action_Init",true,false];
  87.  
  88.                     _x addAction [localize "STR_XENO_Arrimer", "[""Arrimage"",_this] call Script_Choix_Unite;", nil, 2, false, true, "",
  89.                     "[_this] call Script_Verification_Helico and {[vehicle _this] call Script_Verification_Pod} and {!([vehicle _this] call Script_Verification_Objet_Attacher)}"];
  90.  
  91.                     _x addAction [localize "STR_XENO_Desarrimer", "[""Desarrimage"",_this] call Script_Choix_Unite;", nil, 2, false, true, "",
  92.                     "[_this] call Script_Verification_Helico and {[vehicle _this] call Script_Verification_Objet_Attacher}"];
  93.  
  94.                     _x addAction [localize "STR_XENO_Larguer", "[""Largage"",_this] call Script_Choix_Unite;", nil, 2, false, true, "",
  95.                     "[_this] call Script_Verification_Helico and {[vehicle _this] call Script_Verification_Objet_Attacher}"];
  96.                 };
  97.             };
  98.         } foreach units group player;
  99.  
  100.         false
  101.     };
  102. };
  103.  
  104. Script_Verification_Objet_Attacher =
  105. {
  106.     _helico = (_this select 0);
  107.     _objet_Verifier = false;
  108.  
  109.     if (count (attachedObjects _helico) isEqualTo 0) exitwith {_objet_Verifier};
  110.  
  111.     {
  112.         _objet_attache = _x;
  113.         _liste_Class_Parent = [(configfile >> "CfgVehicles" >> typeof _objet_attache),true] call BIS_fnc_returnParents;
  114.  
  115.         {
  116.             if (_x isEqualTo "Pod_Heli_Transport_04_base_F") exitwith {_objet_Verifier = true;};
  117.         } foreach _liste_Class_Parent;
  118.     } foreach attachedObjects _helico;
  119.  
  120.     _objet_Verifier
  121. };
  122.  
  123. Script_Verification_Pod =
  124. {
  125.     _unite = _this select 0;
  126.     _pod = getSlingLoad vehicle _unite;
  127.     _pod_Verifier = false;
  128.  
  129.     if (isnull _pod) exitwith {_pod_Verifier};
  130.  
  131.     _liste_Class_Parent = [(configfile >> "CfgVehicles" >> typeof _pod),true] call BIS_fnc_returnParents;
  132.  
  133.     {
  134.         if (_x isEqualTo "Pod_Heli_Transport_04_base_F") exitwith {_pod_Verifier = true;};
  135.     } foreach _liste_Class_Parent;
  136.  
  137.     _pod_Verifier
  138. };
  139.  
  140. Script_Verification_Helico =
  141. {
  142.     _helico = vehicle (_this select 0);
  143.     _helico_Verifier = false;
  144.     _liste_Class_Parent = [(configfile >> "CfgVehicles" >> typeof _helico),true] call BIS_fnc_returnParents;
  145.  
  146.     {
  147.         if (_x isEqualTo "Heli_Transport_04_base_F") exitwith {_helico_Verifier = true;};
  148.     } foreach _liste_Class_Parent;
  149.  
  150.     _helico_Verifier
  151. };
  152.  
  153. Script_Choix_Unite =
  154. {
  155.     _arrimer_Desarrimer = _this select 0;
  156.     _helico = "";
  157.     _unite_Lancant_Script = [];
  158.  
  159.  
  160.     if (typename (_this select 1) isEqualTo "OBJECT") then {_helico = vehicle (_this select 1);};
  161.     if (typename (_this select 1) isEqualTo "ARRAY") then {_helico = vehicle ((_this select 1) select 0);};
  162.  
  163.     _cables = ropes _helico;
  164.  
  165.     if (ropeUnwound (_cables select 0)) then
  166.     {
  167.         [] call
  168.         {
  169.             if (local _helico) exitwith {_unite_Lancant_Script = [player];};
  170.  
  171.             if (!local _helico) exitwith
  172.             {
  173.                 {
  174.                     _proprietaire_Vehicule = owner _x;
  175.  
  176.                     if (_proprietaire_Vehicule isEqualTo owner _x) exitwith
  177.                     {
  178.                         _unite_Lancant_Script = _x;
  179.                     };
  180.                 } foreach crew _helico;
  181.             };
  182.         };
  183.  
  184.         [] call
  185.         {
  186.             if (_arrimer_Desarrimer isEqualTo "Desarrimage") exitwith {[[_helico],"Script_Taru_Desarrimer_Pod",_unite_Lancant_Script,false,false] call BIS_fnc_MP;};
  187.             if (_arrimer_Desarrimer isEqualTo "Arrimage") exitwith {[[_helico],"Script_Taru_Arrimer_Pod",_unite_Lancant_Script,false,false] call BIS_fnc_MP;};
  188.             if (_arrimer_Desarrimer isEqualTo "Largage") then {[[_helico],"Script_Taru_Larguer_Pod",_unite_Lancant_Script,false,false] call BIS_fnc_MP;};
  189.         };
  190.     };
  191. };
  192.  
  193. Script_Taru_Arrimer_Pod =
  194. {
  195.     _helico = _this select 0;
  196.     _sans_Son = if (count _this > 1) then {_this select 1} else {false};
  197.     _objet_Heliporter = getSlingLoad _helico;
  198.     _mass_Objet_Heliporter = getmass getSlingLoad _helico;
  199.     _mass_Helicoptere = getmass _helico;
  200.     _poids_Helico = weightRTD _helico;
  201.  
  202.  
  203.     if (!isTouchingGround _helico) then
  204.     {
  205.         // if (!_sans_Son) then {[["Son Arrimage", _helico],"Script_Taru_Transmission_Son_Message",[] call Script_BIS_Liste_Joueur,false,false] call BIS_fnc_MP;};
  206.         {ropeUnwind [_x, 1.9, 1];} foreach ropes _helico;
  207.  
  208.         waituntil {ropeLength (ropes _helico select 0) isEqualTo 1};
  209.     };
  210.  
  211.     [] call
  212.     {
  213.         _liste_Class_Parent = [(configfile >> "CfgVehicles" >> typeOf _objet_Heliporter),true] call BIS_fnc_returnParents;
  214.         _helico allowdamage false;
  215.  
  216.         {
  217.             if (_x isEqualTo "Land_Pod_Heli_Transport_04_bench_F") exitwith
  218.             {
  219.                 _objet_Heliporter attachTo [_helico,[0,0.1,-1.13]];
  220.                 _helico setCustomWeightRTD 680;
  221.                 _helico setmass _mass_Objet_Heliporter + _mass_Helicoptere;
  222.             };
  223.  
  224.             if (_x isEqualTo "Land_Pod_Heli_Transport_04_covered_F") exitwith
  225.             {
  226.                 _objet_Heliporter attachTo [_helico,[-0.1,-1.05,-0.82]];
  227.                 _helico setCustomWeightRTD 1413;
  228.                 _helico setmass _mass_Objet_Heliporter + _mass_Helicoptere;
  229.             };
  230.  
  231.             if (_x isEqualTo "Land_Pod_Heli_Transport_04_fuel_F") exitwith
  232.             {
  233.                 _objet_Heliporter attachTo [_helico,[0,-0.282,-1.25]];
  234.                 _helico setCustomWeightRTD 13311;
  235.                 _helico setmass _mass_Objet_Heliporter + _mass_Helicoptere;
  236.             };
  237.  
  238.             if (_x isEqualTo "Land_Pod_Heli_Transport_04_medevac_F") exitwith
  239.             {
  240.                 _objet_Heliporter attachTo [_helico,[-0.14,-1.05,-0.92]];
  241.                 _helico setCustomWeightRTD 1321;
  242.                 _helico setmass _mass_Objet_Heliporter + _mass_Helicoptere;
  243.             };
  244.  
  245.             if (_x in ["Land_Pod_Heli_Transport_04_repair_F","Land_Pod_Heli_Transport_04_box_F","Land_Pod_Heli_Transport_04_ammo_F"]) exitwith
  246.             {
  247.                 _objet_Heliporter attachTo [_helico,[-0.09,-1.05,-1.1]];
  248.                 _helico setCustomWeightRTD 1270;
  249.                 _helico setmass _mass_Objet_Heliporter + _mass_Helicoptere;
  250.             };
  251.         } foreach _liste_Class_Parent;
  252.     };
  253.  
  254.     _helico allowdamage true;
  255.     {ropeUnwind [_x, 250, 1];} foreach ropes _helico;
  256.  
  257.     if (!_sans_Son) then
  258.     {
  259.         // [["Son Fixation", _helico],"Script_Taru_Transmission_Son_Message",[] call Script_BIS_Liste_Joueur,false,false] call BIS_fnc_MP;
  260.         [["Chat arrimage", _helico],"Script_Taru_Transmission_Son_Message",[] call Script_BIS_Liste_Joueur,false,false] call BIS_fnc_MP;
  261.     };
  262.  
  263.     if (isnil {_helico getVariable "EH_GetOut_Taru"}) then
  264.     {
  265.         _helico addEventHandler ["Getin", "[_this] spawn Script_Taru_GetIn;"];
  266.         _helico setVariable ["EH_GetIn_Taru", true, false];
  267.     };
  268. };
  269.  
  270. Script_Taru_Desarrimer_Pod =
  271. {
  272.     _helico = _this select 0;
  273.     _sans_Son = if (count _this > 1) then {_this select 1} else {false};
  274.     _objet_Arrimer = [];
  275.     _objet_Arrimer_Egal_Pod = false;
  276.     _mass_Helicoptere = getmass _helico;
  277.  
  278.  
  279.     {
  280.         _objet_Arrimer = typeOf _x;
  281.         _liste_Class_Parent = [(configfile >> "CfgVehicles" >> _objet_Arrimer),true] call BIS_fnc_returnParents;
  282.  
  283.         {
  284.             if (_x isEqualTo "Pod_Heli_Transport_04_base_F") exitwith {_objet_Arrimer_Egal_Pod = true;};
  285.         } foreach _liste_Class_Parent;
  286.  
  287.         if (_objet_Arrimer_Egal_Pod) exitwith {_objet_Arrimer = _x;};
  288.     } foreach attachedObjects _helico;
  289.  
  290.     _mass_Objet_Heliporter = getmass _objet_Arrimer;
  291.     _helico allowdamage false;
  292.  
  293.     if (!isTouchingGround _helico) then
  294.     {
  295.         _liste_Class_Parent = [(configfile >> "CfgVehicles" >> typeOf _objet_Arrimer),true] call BIS_fnc_returnParents;
  296.  
  297.         {
  298.             if (_x isEqualTo "Land_Pod_Heli_Transport_04_bench_F") exitwith
  299.             {
  300.                 _objet_Arrimer attachTo [_helico,[0,0.1,-2.83]];
  301.             };
  302.         } foreach _liste_Class_Parent;
  303.  
  304.         {
  305.             if (_x isEqualTo "Land_Pod_Heli_Transport_04_covered_F") exitwith
  306.             {
  307.                 _objet_Arrimer attachTo [_helico,[-0.1,-1.05,-2.52]];
  308.             };
  309.         } foreach _liste_Class_Parent;
  310.  
  311.         {
  312.             if (_x isEqualTo "Land_Pod_Heli_Transport_04_fuel_F") exitwith
  313.             {
  314.                 _objet_Arrimer attachTo [_helico,[0,-0.282,-3.05]];
  315.             };
  316.         } foreach _liste_Class_Parent;
  317.  
  318.         {
  319.             if (_x isEqualTo "Land_Pod_Heli_Transport_04_medevac_F") exitwith
  320.             {
  321.                 _objet_Arrimer attachTo [_helico,[-0.14,-1.05,-2.62]];
  322.             };
  323.         } foreach _liste_Class_Parent;
  324.  
  325.         {
  326.             if (_x isEqualTo ["Land_Pod_Heli_Transport_04_repair_F","Land_Pod_Heli_Transport_04_box_F","Land_Pod_Heli_Transport_04_ammo_F"]) then
  327.             {
  328.                 _objet_Arrimer attachTo [_helico,[-0.09,-1.05,-2.8]];
  329.             };
  330.         } foreach _liste_Class_Parent;
  331.     };
  332.  
  333.     if (isTouchingGround _helico) then {{ropeCut [_x, 0];} foreach ropes _helico; _helico setSlingLoad _objet_Arrimer;};
  334.     if (!isTouchingGround _helico) then {{ropeUnwind [_x, 1.9, 10];} foreach ropes _helico;}; //[["Son Desarrimage", _helico],"Script_Taru_Transmission_Son_Message",[] call Script_BIS_Liste_Joueur,false,false] call BIS_fnc_MP;} foreach ropes _helico;};
  335.  
  336.     _helico setCustomWeightRTD 0;
  337.     _helico setmass _mass_Helicoptere - _mass_Objet_Heliporter;
  338.  
  339.     detach _objet_Arrimer;
  340.  
  341.     _helico allowdamage true;
  342.  
  343.     // if (!_sans_Son) then {[["Son Défixation", _helico],"Script_Taru_Transmission_Son_Message",[] call Script_BIS_Liste_Joueur,false,false] call BIS_fnc_MP;};
  344.  
  345.     if (!isTouchingGround _helico) then {waituntil {ropeLength (ropes _helico select 0) isEqualTo 10};};
  346.  
  347.     if (!_sans_Son) then {[["Chat désarrimage", _helico],"Script_Taru_Transmission_Son_Message",[] call Script_BIS_Liste_Joueur,false,false] call BIS_fnc_MP;};
  348. };
  349.  
  350. Script_Taru_Larguer_Pod =
  351. {
  352.     _helico = _this select 0;
  353.     _objet_Arrimer = [];
  354.     _objet_Arrimer_Egal_Pod = false;
  355.  
  356.  
  357.     {
  358.         _objet_Arrimer = typeOf _x;
  359.         _liste_Class_Parent = [(configfile >> "CfgVehicles" >> _objet_Arrimer),true] call BIS_fnc_returnParents;
  360.  
  361.         {
  362.             if (_x isEqualTo "Pod_Heli_Transport_04_base_F") exitwith {_objet_Arrimer_Egal_Pod = true;};
  363.         } foreach _liste_Class_Parent;
  364.  
  365.         if (_objet_Arrimer_Egal_Pod) exitwith {_objet_Arrimer = _x;};
  366.     } foreach attachedObjects _helico;
  367.  
  368.     _helico allowdamage false;
  369.     {ropeCut [_x, 0];} foreach ropes _helico;
  370.     _helico setCustomWeightRTD 0;
  371.     detach _objet_Arrimer;
  372.     _helico allowdamage true;
  373.  
  374.     // [["Son Largage", _helico],"Script_Taru_Transmission_Son_Message",[] call Script_BIS_Liste_Joueur,false,false] call BIS_fnc_MP;
  375.  
  376.     sleep 0.5;
  377.  
  378.     if (ASLToATL getposasl _objet_Arrimer select 2 >= 70) exitwith
  379.     {
  380.         [["Chat largage avec parachute", _helico],"Script_Taru_Transmission_Son_Message",[] call Script_BIS_Liste_Joueur,false,false] call BIS_fnc_MP;
  381.  
  382.         waituntil {ASLToATL getposasl _objet_Arrimer select 2 <= 120};
  383.  
  384.         _parachute = createVehicle ["B_Parachute_02_F",getposatl _objet_Arrimer, [], 0, "CAN COLLIDE"];
  385.         _parachute attachTo [_objet_Arrimer,[0,0,-1]];
  386.  
  387.         [_objet_Arrimer,_parachute,_helico] spawn
  388.         {
  389.             _objet_Arrimer = _this select 0;
  390.             _parachute = _this select 1;
  391.             _helico = _this select 2;
  392.  
  393.             waituntil
  394.             {
  395.                 if (ASLToATL getposasl _objet_Arrimer select 2 <= 5) exitwith
  396.                 {
  397.                     detach _objet_Arrimer;
  398.                     _vitesse_nacelle = velocity _objet_Arrimer;
  399.                     _parachute setVelocity [_vitesse_nacelle select 0 + 1, _vitesse_nacelle select 1 + 1, 0];
  400.                     true
  401.                 };
  402.                 false
  403.             };
  404.         };
  405.  
  406.         waituntil
  407.         {
  408.             if (getposasl _helico distance getposasl _objet_Arrimer >= 50) exitwith
  409.             {
  410.                 detach _parachute;
  411.                 _objet_Arrimer attachTo [_parachute,[0,0,-1]];
  412.                 true
  413.             };
  414.             false
  415.         };
  416.     };
  417.  
  418.     [["Chat largage sans parachute", _helico],"Script_Taru_Transmission_Son_Message",[] call Script_BIS_Liste_Joueur,false,false] call BIS_fnc_MP;
  419. };
  420.  
  421. Script_Taru_Transmission_Son_Message =
  422. {
  423.     _type_Son_Message = _this select 0;
  424.     _helico = vehicle (_this select 1);
  425.  
  426.  
  427.     if (_type_Son_Message isEqualTo "Son Arrimage") exitwith
  428.     {
  429.         if (!isclass (configFile >> "CfgPatches" >> "DragonFyre_Distance")) then
  430.         {
  431.             _helico say "XENO_Helitreuillage_Arrimage_Exterieur";
  432.         };
  433.         if (isclass (configFile >> "CfgPatches" >> "DragonFyre_Distance")) then
  434.         {
  435.             _helico say "XENO_Helitreuillage_Arrimage_Exterieur_JSRS";
  436.         };
  437.  
  438.         if (player in crew _helico) then
  439.         {
  440.             if (!isclass (configFile >> "CfgPatches" >> "DragonFyre_Distance")) then
  441.             {
  442.                 playSound ["XENO_Helitreuillage_Arrimage_Interieur",true];
  443.             };
  444.             if (isclass (configFile >> "CfgPatches" >> "DragonFyre_Distance")) then
  445.             {
  446.                 playSound ["XENO_Helitreuillage_Arrimage_Interieur_JSRS",true];
  447.             };
  448.         };
  449.     };
  450.  
  451.     if (_type_Son_Message isEqualTo "Son Desarrimage") exitwith
  452.     {
  453.         if (!isclass (configFile >> "CfgPatches" >> "DragonFyre_Distance")) then
  454.         {
  455.             _helico say "XENO_Helitreuillage_Desarrimage_Exterieur";
  456.         };
  457.         if (isclass (configFile >> "CfgPatches" >> "DragonFyre_Distance")) then
  458.         {
  459.             _helico say "XENO_Helitreuillage_Desarrimage_Exterieur_JSRS";
  460.         };
  461.  
  462.         if (player in crew _helico) then
  463.         {
  464.             if (!isclass (configFile >> "CfgPatches" >> "DragonFyre_Distance")) then
  465.             {
  466.                 playSound ["XENO_Helitreuillage_Desarrimage_Interieur",true];
  467.             };
  468.             if (isclass (configFile >> "CfgPatches" >> "DragonFyre_Distance")) then
  469.             {
  470.                 playSound ["XENO_Helitreuillage_Desarrimage_Interieur_JSRS",true];
  471.             };
  472.         };
  473.     };
  474.  
  475.     if (_type_Son_Message isEqualTo "Son Fixation") exitwith
  476.     {
  477.         _helico say "XENO_Helitreuillage_Fixation";
  478.         if (player in crew _helico) then {playSound ["XENO_Helitreuillage_Fixation",true];};
  479.     };
  480.  
  481.     if (_type_Son_Message isEqualTo "Son Défixation") exitwith
  482.     {
  483.         _helico say "XENO_Helitreuillage_Defixation";
  484.         if (player in crew _helico) then {playSound ["XENO_Helitreuillage_Defixation",true];};
  485.     };
  486.  
  487.     if (_type_Son_Message isEqualTo "Son Largage") exitwith
  488.     {
  489.         _helico say "XENO_Helitreuillage_Largage";
  490.         if (player in crew _helico) then {playSound ["XENO_Helitreuillage_Largage",true];};
  491.     };
  492.  
  493.     if (_type_Son_Message isEqualTo "Chat arrimage") exitwith
  494.     {
  495.         if (player in crew _helico) then {_helico vehicleChat localize "STR_XENO_Chat_Arrimer";};
  496.     };
  497.  
  498.     if (_type_Son_Message isEqualTo "Chat désarrimage") exitwith
  499.     {
  500.         if (player in crew _helico) then {_helico vehicleChat localize "STR_XENO_Chat_Desarrimer";};
  501.     };
  502.  
  503.     if (_type_Son_Message isEqualTo "Chat largage avec parachute") exitwith
  504.     {
  505.         if (player in crew _helico) then {_helico vehicleChat localize "STR_XENO_Chat_Larguer_Avec_Parachute";};
  506.     };
  507.  
  508.     if (_type_Son_Message isEqualTo "Chat largage sans parachute") then
  509.     {
  510.         if (player in crew _helico) then {_helico vehicleChat localize "STR_XENO_Chat_Larguer_Sans_Parachute";};
  511.     };
  512. };
  513.  
  514. Script_BIS_Liste_Joueur =
  515. {
  516.     private ["_players"];
  517.     _players = [];
  518.  
  519.  
  520.     {
  521.         if (isplayer _x) then
  522.         {
  523.             if (_x isKindOf "man") then {_players pushback _x;};
  524.         };
  525.     } foreach (allunits + alldead);
  526.  
  527.     _players
  528. };
  529.  
  530. Script_Taru_GetIn =
  531. {
  532.     _vehicule = _this select 0 select 0;
  533.     if ([_vehicule] call Script_Verification_Helico) then
  534.     {
  535.         if (count attachedObjects _vehicule > 0) then
  536.         {
  537.             _time = time + 2;
  538.             waituntil
  539.             {
  540.                 _vehicule setvelocity [0, 0, 0];
  541.                 if (time > _time or {time > _time + 15}) exitwith {true};
  542.             };
  543.         };
  544.     };
  545. };
  546.  
  547. Script_Joueur_Tuer_ReInit_Variable_Boucle_Action =
  548. {
  549.     waituntil {if (alive player) exitwith {true}; false};
  550.     player setVariable ["Variable_Action_Init",false,false];
  551. };
  552.  
  553. [] call Script_Taru;
  554.  
  555. XENO_Taru_EH_Killed = player addEventHandler ["Killed", "[] spawn Script_Joueur_Tuer_ReInit_Variable_Boucle_Action;"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement