Advertisement
Guest User

smac_aimbot.patch

a guest
Sep 27th, 2014
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.42 KB | None | 0 0
  1. 6a7
  2. > #include <smac_aimbot>
  3. 23,25c24,26
  4. < #define AIM_ANGLE_CHANGE  45.0    // Max angle change that a player should snap
  5. < #define AIM_BAN_MIN           4       // Minimum number of detections before an auto-ban is allowed
  6. < #define AIM_MIN_DISTANCE  200.0   // Minimum distance acceptable for a detection.
  7. ---
  8. > new Float:AIM_ANGLE_CHANGE = 45.0;    // Max angle change that a player should snap
  9. > new AIM_BAN_MIN = 4;                  // Minimum number of detections before an auto-ban is allowed
  10. > new Float:AIM_MIN_DISTANCE = 200.0;   // Minimum distance acceptable for a detection.
  11. 37a39,47
  12. > public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
  13. > {
  14. >   API_Init();
  15. >   RegPluginLibrary("smac_aimbot");
  16. >
  17. >   return APLRes_Success;
  18. > }
  19. >
  20. > /* Plugin Functions */
  21. 41c51
  22. <  
  23. ---
  24. >
  25. 43c53
  26. <   g_hCvarAimbotBan = SMAC_CreateConVar("smac_aimbot_ban", "0", "Number of aimbot detections before a player is banned. Minimum allowed is 4. (0 = Never ban)", FCVAR_PLUGIN, true, 0.0);
  27. ---
  28. >   g_hCvarAimbotBan = SMAC_CreateConVar("smac_aimbot_ban", "0", "Number of aimbot detections before a player is banned.\nMinimum default value allowed is 4. (0 = Never ban)\nSome plugins can change the minimum value.", FCVAR_PLUGIN, true, 0.0);
  29. 46c56
  30. <  
  31. ---
  32. >
  33. 52c62
  34. <  
  35. ---
  36. >
  37. 55c65
  38. <  
  39. ---
  40. >
  41. 97c107
  42. <  
  43. ---
  44. >
  45. 101c111
  46. <  
  47. ---
  48. >
  49. 110c120
  50. <  
  51. ---
  52. >
  53. 141c151
  54. <  
  55. ---
  56. >
  57. 165c175
  58. <  
  59. ---
  60. >
  61. 177c187
  62. <  
  63. ---
  64. >
  65. 180c190
  66. <      
  67. ---
  68. >
  69. 183c193
  70. <  
  71. ---
  72. >
  73. 189c199
  74. <      
  75. ---
  76. >
  77. 203c213
  78. <  
  79. ---
  80. >
  81. 208c218
  82. <      
  83. ---
  84. >
  85. 211c221
  86. <      
  87. ---
  88. >
  89. 215c225
  90. <      
  91. ---
  92. >
  93. 229c239
  94. <  
  95. ---
  96. >
  97. 234c244
  98. <      
  99. ---
  100. >
  101. 237c247
  102. <      
  103. ---
  104. >
  105. 241c251
  106. <      
  107. ---
  108. >
  109. 253c263
  110. <  
  111. ---
  112. >
  113. 258c268
  114. <  
  115. ---
  116. >
  117. 266c276
  118. <  
  119. ---
  120. >
  121. 271c281
  122. <  
  123. ---
  124. >
  125. 283c293
  126. <      
  127. ---
  128. >
  129. 292c302
  130. <  
  131. ---
  132. >
  133. 299c309
  134. <          
  135. ---
  136. >
  137. 304c314
  138. <      
  139. ---
  140. >
  141. 312c322
  142. <      
  143. ---
  144. >
  145. 315c325
  146. <      
  147. ---
  148. >
  149. 327c337
  150. <      
  151. ---
  152. >
  153. 338c348
  154. <  
  155. ---
  156. >
  157. 357c367
  158. <  
  159. ---
  160. >
  161. 360c370
  162. <  
  163. ---
  164. >
  165. 365c375
  166. <  
  167. ---
  168. >
  169. 370c380
  170. <      
  171. ---
  172. >
  173. 376c386
  174. <          
  175. ---
  176. >
  177. 384c394
  178. <  
  179. ---
  180. >
  181. 392c402
  182. <  
  183. ---
  184. >
  185. 396a407,458
  186. > }
  187. >
  188. > // ====================================
  189. > //                NATIVES
  190. > // ====================================
  191. > API_Init()
  192. > {
  193. >   CreateNative("SMAC_SetAimAngleChange", Native_SetAimAngleChange);
  194. >   CreateNative("SMAC_SetBanMin", Native_SetBanMin);
  195. >   CreateNative("SMAC_SetAimMinDistance", Native_SetAimMinDistance);
  196. >
  197. >   CreateNative("SMAC_GetAimAngleChange", Native_GetAimAngleChange);
  198. >   CreateNative("SMAC_GetBanMin", Native_GetBanMin);
  199. >   CreateNative("SMAC_GetAimMinDistance", Native_GetAimMinDistance);
  200. > }
  201. >
  202. > public Native_GetAimAngleChange(Handle:plugin, numParams)
  203. > {
  204. >   return _:AIM_ANGLE_CHANGE;
  205. > }
  206. >
  207. > public Native_GetBanMin(Handle:plugin, numParams)
  208. > {
  209. >   return AIM_BAN_MIN;
  210. > }
  211. >
  212. > public Native_GetAimMinDistance(Handle:plugin, numParams)
  213. > {
  214. >   return _:AIM_MIN_DISTANCE;
  215. > }
  216. >
  217. > public Native_SetAimAngleChange(Handle:plugin, numParams)
  218. > {
  219. >   AIM_ANGLE_CHANGE = Float:GetNativeCell(1);
  220. > }
  221. >
  222. > public Native_SetBanMin(Handle:plugin, numParams)
  223. > {
  224. >   AIM_BAN_MIN = GetNativeCell(1);
  225. >   if(AIM_BAN_MIN == 0)
  226. >   {
  227. >       g_iAimbotBan=0;
  228. >   }
  229. >   else if(AIM_BAN_MIN > 0 && g_iAimbotBan < AIM_BAN_MIN)
  230. >   {
  231. >       g_iAimbotBan=AIM_BAN_MIN;
  232. >   }
  233. > }
  234. >
  235. > public Native_SetAimMinDistance(Handle:plugin, numParams)
  236. > {
  237. >   AIM_MIN_DISTANCE = Float:GetNativeCell(1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement