Advertisement
Guest User

Untitled

a guest
Jul 9th, 2014
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.46 KB | None | 0 0
  1. //Snapbuild pro
  2. if (!isDedicated) then {
  3. /* Use command menu instead of scroll menu? (default = false) */
  4. DZE_SNAP_PRO_USE_COMMAND_MENU = false;
  5.  
  6. DZE_SNAP_BUILD_NUMKEYS = [0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B];
  7.  
  8. player_build = compile preprocessFileLineNumbers "custom\snap_pro\player_build.sqf";
  9. snap_build = compile preprocessFileLineNumbers "custom\snap_pro\snap_build.sqf";
  10. dayz_spaceInterrupt = compile preprocessFileLineNumbers "custom\snap_pro\dayz_spaceInterrupt.sqf";
  11. };
  12.  
  13. //Custom Self Actions File
  14. fnc_usec_selfActions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf";
  15. // zombie bait/bomb
  16. zombie_findTargetAgent = compile preprocessFileLineNumbers "scripts\zombie_findTargetAgent.sqf";
  17.  
  18. //Base Building 1.3 Specific Compiles
  19. //player_build = compile preprocessFileLineNumbers "dayz_code\actions\player_build.sqf";
  20. player_build2 = compile preprocessFileLineNumbers "dayz_code\compile\player_build2.sqf";
  21. antiWall = compile preprocessFileLineNumbers "dayz_code\compile\antiWall.sqf";
  22. anti_discWall = compile preprocessFileLineNumbers "dayz_code\compile\anti_discWall.sqf";
  23. refresh_build_recipe_dialog = compile preprocessFileLineNumbers "buildRecipeBook\refresh_build_recipe_dialog.sqf";
  24. refresh_build_recipe_list_dialog = compile preprocessFileLineNumbers "buildRecipeBook\refresh_build_recipe_list_dialog.sqf";
  25. add_UIDCode = compile preprocessFileLineNumbers "dayz_code\external\keypad\fnc_keyPad\functions\add_UIDCode.sqf";
  26. remove_UIDCode = compile preprocessFileLineNumbers "dayz_code\external\keypad\fnc_keyPad\functions\remove_UIDCode.sqf";
  27. //Right click menus
  28. player_selectSlot = compile preprocessFileLineNumbers "scripts\ui_selectSlot.sqf";
  29. //Custom death screen and auto abort
  30. player_death = compile preprocessFileLineNumbers "scripts\player_death.sqf";
  31.  
  32.  
  33. // if (!isDedicated) then {
  34. // player_build = compile preprocessFileLineNumbers "custom\snap_build\player_build.sqf";
  35. // player_buildControls = compile preprocessFileLineNumbers "custom\snap_build\player_buildControls.sqf";
  36. // snap_object = compile preprocessFileLineNumbers "custom\snap_build\snap_object.sqf";
  37. // //DZGM
  38. // player_switchModel = compile preprocessFileLineNumbers "custom\player_switchModel.sqf";
  39. // };
  40.  
  41. //CANT TOW LOCKED VEHICLES
  42. local_lockUnlock = compile preprocessFileLineNumbers "scripts\local_lockUnlock.sqf";
  43.  
  44. //To Disable Loot and or Zombie Spawns in Base Build Objects
  45. //player_spawnCheck = compile preprocessFileLineNumbers "dayz_code\compile\player_spawnCheck.sqf";
  46.  
  47. //Keybinds
  48. dayz_spaceInterrupt = {
  49. private ["_dikCode", "_handled"];
  50. _dikCode = _this select 1;
  51. _handled = false;
  52. if (_dikCode in[0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3D,0x3C,0x3B,0x0B,0x0A,0x09,0x08,0x07,0x06,0x05]) then {
  53. _handled = true;
  54. };
  55. if (_dikCode in actionKeys "MoveForward") exitWith {r_interrupt = true};
  56. if (_dikCode in actionKeys "MoveLeft") exitWith {r_interrupt = true};
  57. if (_dikCode in actionKeys "MoveRight") exitWith {r_interrupt = true};
  58. if (_dikCode in actionKeys "MoveBack") exitWith {r_interrupt = true};
  59. //Prevent exploit of drag body
  60. if ((_dikCode in actionKeys "Prone") and r_drag_sqf) exitWith { force_dropBody = true; };
  61. if ((_dikCode in actionKeys "Crouch") and r_drag_sqf) exitWith { force_dropBody = true; };
  62. _shift = _this select 2;
  63. _ctrl = _this select 3;
  64. _alt = _this select 4;
  65. //diag_log format["Keypress: %1", _this];
  66. if (_dikCode in (actionKeys "GetOver")) then {
  67.  
  68. if (player isKindOf "PZombie_VB") then {
  69. _handled = true;
  70. DZE_PZATTACK = true;
  71. } else {
  72. _nearbyObjects = nearestObjects[getPosATL player, dayz_disallowedVault, 8];
  73. if (count _nearbyObjects > 0) then {
  74. if((diag_tickTime - dayz_lastCheckBit > 4)) then {
  75. [objNull, player, rSwitchMove,"GetOver"] call RE;
  76. player playActionNow "GetOver";
  77. dayz_lastCheckBit = diag_tickTime;
  78. } else {
  79. _handled = true;
  80. };
  81. };
  82. };
  83. };
  84. //if (_dikCode == 57) then {_handled = true}; // space
  85. //if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
  86. if (_dikCode == 210) then {
  87. _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
  88. };
  89. if (_dikCode in actionKeys "ForceCommandingMode") then {_handled = true};
  90. if (_dikCode in actionKeys "PushToTalk" and (diag_tickTime - dayz_lastCheckBit > 10)) then {
  91. dayz_lastCheckBit = diag_tickTime;
  92. [player,50,true,(getPosATL player)] spawn player_alertZombies;
  93. };
  94. if (_dikCode in actionKeys "VoiceOverNet" and (diag_tickTime - dayz_lastCheckBit > 10)) then {
  95. dayz_lastCheckBit = diag_tickTime;
  96. [player,50,true,(getPosATL player)] spawn player_alertZombies;
  97. };
  98. if (_dikCode in actionKeys "PushToTalkDirect" and (diag_tickTime - dayz_lastCheckBit > 10)) then {
  99. dayz_lastCheckBit = diag_tickTime;
  100. [player,15,false,(getPosATL player)] spawn player_alertZombies;
  101. };
  102. if (_dikCode in actionKeys "Chat" and (diag_tickTime - dayz_lastCheckBit > 10)) then {
  103. dayz_lastCheckBit = diag_tickTime;
  104. [player,15,false,(getPosATL player)] spawn player_alertZombies;
  105. };
  106. if (_dikCode in actionKeys "User20" and (diag_tickTime - dayz_lastCheckBit > 5)) then {
  107. dayz_lastCheckBit = diag_tickTime;
  108. _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
  109. };
  110. // numpad 8 0x48 now pgup 0xC9 1
  111. if ((_dikCode == 0xC9 and (!_alt or !_ctrl)) or (_dikCode in actionKeys "User15")) then {
  112. DZE_Q = true;
  113. };
  114. // numpad 2 0x50 now pgdn 0xD1
  115. if ((_dikCode == 0xD1 and (!_alt or !_ctrl)) or (_dikCode in actionKeys "User16")) then {
  116. DZE_Z = true;
  117. };
  118. // numpad 8 0x48 now pgup 0xC9 0.1
  119. if ((_dikCode == 0xC9 and (_alt and !_ctrl)) or (_dikCode in actionKeys "User13")) then {
  120. DZE_Q_alt = true;
  121. };
  122. // numpad 2 0x50 now pgdn 0xD1
  123. if ((_dikCode == 0xD1 and (_alt and !_ctrl)) or (_dikCode in actionKeys "User14")) then {
  124. DZE_Z_alt = true;
  125. };
  126. // numpad 8 0x48 now pgup 0xC9 0.01
  127. if ((_dikCode == 0xC9 and (!_alt and _ctrl)) or (_dikCode in actionKeys "User7")) then {
  128. DZE_Q_ctrl = true;
  129. };
  130. // numpad 2 0x50 now pgdn 0xD1
  131. if ((_dikCode == 0xD1 and (!_alt and _ctrl)) or (_dikCode in actionKeys "User8")) then {
  132. DZE_Z_ctrl = true;
  133. };
  134. // numpad 4 0x4B now Q 0x10
  135. if (_dikCode == 0x10 or (_dikCode in actionKeys "User17")) then {
  136. DZE_4 = true;
  137. };
  138. // numpad 6 0x4D now E 0x12
  139. if (_dikCode == 0x12 or (_dikCode in actionKeys "User18")) then {
  140. DZE_6 = true;
  141. };
  142. // numpad 5 0x4C now space 0x39
  143. if (_dikCode == 0x39 or (_dikCode in actionKeys "User19")) then {
  144. DZE_5 = true;
  145. };
  146. // esc
  147. if (_dikCode == 0x01) then {
  148. DZE_cancelBuilding = true;
  149. };
  150. if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (diag_tickTime - dayz_lastCheckBit > 10)) then {
  151. dayz_lastCheckBit = diag_tickTime;
  152. call dayz_forceSave;
  153. };
  154. /*
  155. if (_dikCode in actionKeys "IngamePause") then {
  156. _idOnPause = [] spawn dayz_onPause;
  157. };
  158. */
  159. //Keybinds for Base Building
  160. _shiftState = _this select 2;
  161. //Elevate NumPad 8
  162. if ((_dikCode == 0x48) && !_shiftState) then {
  163. DZ_BB_E = true;
  164. _handled = true;
  165. };
  166. //Lower NumPad 5
  167. if ((_dikCode == 0x4C) && !_shiftState) then {
  168. DZ_BB_L = true;
  169. _handled = true;
  170. };
  171. //Elevate Small shift + NumPad 8
  172. if (_dikCode == 0x48) then {
  173. DZ_BB_Es = true;
  174. _handled = true;
  175. };
  176. //Lower Small shift + NumPad 5
  177. if (_dikCode == 0x4C) then {
  178. DZ_BB_Ls = true;
  179. _handled = true;
  180. };
  181. //Rotate Left NumPad 7
  182. if ((_dikCode == 0x47) && !_shiftState) then {
  183. DZ_BB_Rl = true;
  184. _handled = true;
  185. };
  186. //Rotate Right NumPad 9
  187. if ((_dikCode == 0x49) && !_shiftState) then {
  188. DZ_BB_Rr = true;
  189. _handled = true;
  190. };
  191. //Rotate Left Small Shift + NumPad 7
  192. if (_dikCode == 0x47) then {
  193. DZ_BB_Rls = true;
  194. _handled = true;
  195. };
  196. //Rotate Right Small Shift + NumPad 9
  197. if (_dikCode == 0x49) then {
  198. DZ_BB_Rrs = true;
  199. _handled = true;
  200. };
  201. //Push Away NumPad 4
  202. if (_dikCode == 0x4B) then {
  203. DZ_BB_A = true;
  204. _handled = true;
  205. };
  206. //Pull Near NumPad 1
  207. if (_dikCode == 0x4F) then {
  208. DZ_BB_N = true;
  209. _handled = true;
  210. };
  211. //Move Left NumPad 2
  212. if (_dikCode == 0x50) then {
  213. DZ_BB_Le = true;
  214. _handled = true;
  215. };
  216. //Move Right NumPad 3
  217. if (_dikCode == 0x51) then {
  218. DZ_BB_Ri = true;
  219. _handled = true;
  220. };
  221. _handled
  222. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement