Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.63 KB | None | 0 0
  1. //controls brought to us by the amazing Bad Benson. His work is outstanding and he has taught me much!
  2.  
  3. class CfgPatches
  4. {
  5. class Jbad_Vehicle_controls
  6. {
  7. units[] = {};
  8. weapons[] = {};
  9. requiredVersion = 0.1;
  10. requiredAddons[] = {};
  11. };
  12. };
  13. class Jbad_controls_RscButton
  14. {
  15. access = 0;
  16. idc = -1;
  17. type = 1;
  18. text = "";
  19. colorText[] = {1,1,1,0.5};
  20. colorDisabled[] = {1,1,1,1};
  21. colorBackground[] = {0,0,0,0.3};
  22. colorBackgroundDisabled[] = {0,0.0,0};
  23. colorBackgroundActive[] = {0.15,0.35,0.55,0.7};
  24. colorFocused[] = {0.75,0.75,0.75,0.5};
  25. colorShadow[] = {0,0,0,0};
  26. colorBorder[] = {0.023529,0,0.0313725,1};
  27. soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1};
  28. soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1};
  29. soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
  30. soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
  31. style = 2;
  32. x = 0;
  33. y = 0;
  34. w = 0.055589;
  35. h = 0.039216;
  36. shadow = 2;
  37. font = "EtelkaNarrowMediumPro";
  38. sizeEx = 0.02921;
  39. offsetX = 0.003;
  40. offsetY = 0.003;
  41. offsetPressedX = 0.002;
  42. offsetPressedY = 0.002;
  43. borderSize = 0;
  44. };
  45. class Jbad_crane_back
  46. {
  47. access = 0;
  48. type = CT_STATIC;
  49. style = ST_CENTER;
  50. idc = -1;
  51. colorBackground[] = {0,0,0,1};
  52. colorText[] = {1,1,1,1};
  53. text = "";
  54. fixedWidth = 0;
  55. x = 0;
  56. y = 0;
  57. h = 0;
  58. w = 0;
  59. shadow = 2;
  60. font = "PuristaMedium";
  61. SizeEx = 0.03000;
  62. };
  63. class Jbad_Crane_MENU
  64. {
  65. idd = -1;
  66. movingenable = 1;
  67. onLoad = "uinamespace setvariable ['Jbad_Crane_MENU', _this select 0];";
  68. class Controls
  69. {
  70. class background : Jbad_crane_back
  71. {
  72. text = "\Jbad_Defines\Jbad_Vehicle_Controls\data\Screen_Monitor.paa";////your picture here
  73. idc = -1;
  74. style = 48;
  75. x = 0.5 * safezoneW + safezoneX;
  76. y = 0.2 * safezoneH + safezoneY;
  77. w = .3 * safezoneW;
  78. h = .5 * safezoneH;
  79. color[] = {1,1,1,1};
  80. colorBackground[] = {0,0,0,0};
  81. };
  82. class hook_up: Jbad_controls_RscButton
  83. {
  84. idc = -1;
  85. text = "Down";
  86. x = "0.72 - 0.005";
  87. y = "0.5 - 0.1 + 0.05";
  88. w = "0.1";
  89. h = "0.1";
  90. action = "if (((vehicle player) animationPhase 'Hook_1') <= 1) then {(vehicle player) animate ['Hook_1', ((vehicle player) animationPhase 'Hook_1')+0.025]}";
  91. };
  92. class hook_down: Jbad_controls_RscButton
  93. {
  94. idc = -1;
  95. text = "Up";
  96. x = "0.72 - 0.005";
  97. y = "0.5 - 0.1 - 0.05";
  98. w = "0.1";
  99. h = "0.1";
  100. action = "if (((vehicle player) animationPhase 'Hook_1') >= 0) then {(vehicle player) animate ['Hook_1', ((vehicle player) animationPhase 'Hook_1')-0.025]}";
  101. };
  102. class Exit: Jbad_controls_RscButton
  103. {
  104. idc = -1;
  105. text = "";
  106. colorText[] = {0,0,0,0};
  107. colorDisabled[] = {0,0,0,0};
  108. colorBackgroundActive[] = {0,0,0,0};
  109. colorFocused[] = {0,0,0,0};
  110. colorShadow[] = {0,0,0,0};
  111. colorBorder[] = {0,0,0,0};
  112. x = "1.245 - 0.005 - 0.1";
  113. y = "0.4 - 0.1 - 0.15";
  114. w = "0.05";
  115. h = "0.05";
  116. action = "closeDialog 0";
  117. };
  118. class Pully_foward: Jbad_controls_RscButton
  119. {
  120. idc = -1;
  121. text = "Foward";
  122. x = "0.72 - 0.005 - 0.101";
  123. y = "0.3 - 0.1 + 0.005";
  124. w = "0.1";
  125. h = "0.1";
  126. action = "if (((vehicle player) animationPhase 'pully') <= 1) then {(vehicle player) animate ['pully', ((vehicle player) animationPhase 'pully')+0.025]}";
  127. };
  128. class Pully_backward: Jbad_controls_RscButton
  129. {
  130. idc = -1;
  131. text = "Backward";
  132. x = "0.72 - 0.005 + 0.102";
  133. y = "0.3 - 0.1 + 0.005";
  134. w = "0.1";
  135. h = "0.1";
  136. action = "if (((vehicle player) animationPhase 'pully') >= -1) then {(vehicle player) animate ['pully', ((vehicle player) animationPhase 'pully')-0.025]}";
  137. };
  138. class crane_left: Jbad_controls_RscButton
  139. {
  140. idc = -1;
  141. text = "Turn Left";
  142. x = "0.72 - 0.005 - 0.101";
  143. y = "0.5 - 0.1 + 0.005";
  144. w = "0.1";
  145. h = "0.1";
  146. action = "if (((vehicle player) animationPhase 'boom') <= 1) then {(vehicle player) animate ['boom', ((vehicle player) animationPhase 'boom')+0.025]}";
  147. };
  148. class crane_right: Jbad_controls_RscButton
  149. {
  150. idc = -1;
  151. text = "Turn Right";
  152. x = "0.72 - 0.005 + 0.102";
  153. y = "0.5 - 0.1 + 0.005";
  154. w = "0.1";
  155. h = "0.1";
  156. action = "if (((vehicle player) animationPhase 'boom') >= -1) then {(vehicle player) animate ['boom', ((vehicle player) animationPhase 'boom')-0.025]}";
  157. };
  158. class crane_attach: Jbad_controls_RscButton
  159. {
  160. idc = -1;
  161. text = "Attach Hook";
  162. x = "0.5 - 0.1 + 0.58";
  163. y = "0.5 - 0.1 + 0.12";
  164. w = "0.1";
  165. h = "0.1";
  166. action = "if (((vehicle player) animationPhase 'Hook_1') > 0.5) then {_selpos = (vehicle player) selectionPosition 'Hook_1'; _pos1 = (vehicle player) modeltoworld _selpos; _pos2 = (vehicle player) modeltoworld [_selpos select 0, _selpos select 1, (_selpos select 2) - 2]; _types = (vehicle player) getvariable 'hookblist'; _objs = lineintersectsWith [ATLtoASL _pos1, ATLtoASL _pos2];if (count _objs > 0) then {{if (_x isKindOf (_types select 0)) then {_objs = _objs - [_x]};} foreach _objs}; if (count _objs > 0) then {(_objs select 0) attachto [(vehicle player), [0,0,0], 'Hook_1']; (vehicle player) setvariable ['ishooking', true, true]; (vehicle player) setvariable ['hooked', (_objs select 0), true];};}";
  167. };
  168. class crane_detach: Jbad_controls_RscButton
  169. {
  170. idc = -1;
  171. text = "Detach Hook";
  172. x = "0.5 - 0.1 + 0.58";
  173. y = "0.5 - 0.1 - 0.25";
  174. w = "0.1";
  175. h = "0.1";
  176. action = "if ((vehicle player) getvariable 'ishooking') then {_obj = (vehicle player) getvariable 'hooked'; detach _obj; _obj setvelocity [0,0,-1]; (vehicle player) setvariable ['ishooking', false, true]; (vehicle player) setvariable ['hooked', [], true];}";
  177. };
  178. };
  179. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement