Advertisement
zSkullfox

Untitled

Feb 3rd, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. // WARNING: inGameUISetEventHandler script may replace any other scripts that is using "inGameUISetEventHandler" or this script may not work.
  2.  
  3. FDLC_GETIN = {
  4. params ["_args"];
  5.  
  6. _args params ["_object","_player"];
  7.  
  8. _lildelay = 0.1;
  9. // if the _object is a DLC vehicle
  10. _dlc_obj_number = getObjectDLC _object;
  11. systemChat str(typeOf _object);
  12. if (typeName _dlc_obj_number == "SCALAR") then {
  13. // if the player doesn't own the DLC
  14. if (!(_dlc_obj_number in getDLCs 1)) then {
  15.  
  16. [] spawn {
  17. _allDisps = allDisplays;
  18.  
  19. {
  20. if (str(_x) == "Display #169") then {
  21. _x closeDisplay 1;
  22. };
  23. } forEach _allDisps;
  24. };
  25. // Where magic happens
  26. _txt =_args select 4;
  27.  
  28. if (_txt find "Pilot" != -1) then {
  29. _player moveInDriver _object;
  30. };
  31. if (_txt find "Pilot's" != -1) then {
  32. _player setpos getpos _object;
  33. sleep _lildelay;
  34. _player moveInTurret [_object,[0]];
  35. };
  36.  
  37. if (_txt find "Copilot" != -1) then {
  38. _player moveInTurret [_object,[0]];
  39. };
  40.  
  41. if (_txt find "Copilot's" != -1) then {
  42. _player setpos getpos _object;
  43. sleep _lildelay;
  44. _player moveInTurret [_object,[0]];
  45. };
  46.  
  47. if (_txt find "Gunner" != -1) then {
  48. _player moveInGunner _object;
  49. };
  50. if (_txt find "Gunner's" != -1) then {
  51. _player setpos getpos _object;
  52. sleep _lildelay;
  53. _player moveInGunner _object;
  54. };
  55.  
  56.  
  57. if (typeOf _object in ["B_Heli_Transport_03_F","B_T_VTOL_01_armed_F","B_T_VTOL_01_infantry_F","B_T_VTOL_01_vehicle_F"]) then {
  58. if (_txt find "Right door gunner" != -1) then {
  59. _player moveInTurret [_object,[2]];
  60. };
  61. if (_txt find "Left door gunner" != -1) then {
  62. _player moveInTurret [_object,[1]];
  63. };
  64.  
  65. if (_txt find "Right door gunner's" != -1) then {
  66. _player setpos getpos _object;
  67. sleep _lildelay;
  68. _player moveInTurret [_object,[2]];
  69. };
  70. if (_txt find "Left door gunner's" != -1) then {
  71. _player setpos getpos _object;
  72. sleep _lildelay;
  73. _player moveInTurret [_object,[1]];
  74. };
  75. };
  76.  
  77. if (typeOf _object in ["O_Heli_Transport_04_F","O_Heli_Transport_04_ammo_F","O_Heli_Transport_04_bench_F","O_Heli_Transport_04_box_F","O_Heli_Transport_04_fuel_F","O_Heli_Transport_04_medevac_F","O_Heli_Transport_04_repair_F","O_Heli_Transport_04_covered_F"]) then {
  78. if (_txt find "Loadmaster" != -1) then {
  79. _player moveInTurret [_object,[1]];
  80. };
  81. if (_txt find "Loadmaster's" != -1) then {
  82. _player setpos getpos _object;
  83. sleep _lildelay;
  84. _player moveInTurret [_object,[1]];
  85. };
  86. };
  87. // Land Vehicles
  88.  
  89. if (_txt find "Driver" != -1) then {
  90. _player moveInDriver _object;
  91. };
  92. if (_txt find "Driver's" != -1) then {
  93. _player setpos getpos _object;
  94. sleep _lildelay;
  95. _player moveInDriver _object;
  96. };
  97.  
  98. if (_txt find "Commander" != -1) then {
  99. _player moveInCommander _object;
  100. };
  101. if (_txt find "Commander's" != -1) then {
  102. _player setpos getpos _object;
  103. sleep _lildelay;
  104. _player moveInCommander _object;
  105. };
  106. };
  107. }
  108.  
  109. };
  110. inGameUISetEventHandler ["Action", "[_this] call FDLC_GETIN"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement