zs13213134

extended ragebot

Dec 21st, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.58 KB | None | 0 0
  1. local globals_realtime = globals.realtime
  2. local globals_curtime = globals.curtime
  3. local globals_frametime = globals.frametime
  4. local globals_absolute_frametime = globals.absoluteframetime
  5. local globals_maxplayers = globals.maxplayers
  6. local globals_tickcount = globals.tickcount
  7. local globals_tickinterval = globals.tickinterval
  8. local globals_mapname = globals.mapname
  9.  
  10. local client_set_event_callback = client.set_event_callback
  11. local client_console_log = client.log
  12. local client_color_log = client.color_log
  13. local client_console_cmd = client.exec
  14. local client_userid_to_entindex = client.userid_to_entindex
  15. local client_get_cvar = client.get_cvar
  16. local client_set_cvar = client.set_cvar
  17. local client_draw_debug_text = client.draw_debug_text
  18. local client_draw_hitboxes = client.draw_hitboxes
  19. local client_draw_indicator = client.draw_indicator
  20. local client_random_int = client.random_int
  21. local client_random_float = client.random_float
  22. local client_draw_text = client.draw_text
  23. local client_draw_rectangle = client.draw_rectangle
  24. local client_draw_line = client.draw_line
  25. local client_draw_gradient = client.draw_gradient
  26. local client_draw_cricle = client.draw_circle
  27. local client_draw_circle_outline = client.draW_circle_outline
  28. local client_world_to_screen = client.world_to_screen
  29. local client_screen_size = client.screen_size
  30. local client_visible = client.visible
  31. local client_delay_call = client.delay_call
  32. local client_latency = client.latency
  33. local client_camera_angles = client.camera_angles
  34. local client_trace_line = client.trace_line
  35. local client_eye_position = client.eye_position
  36. local client_set_clan_tag = client.set_clan_tag
  37. local client_system_time = client.system_time
  38.  
  39. local entity_get_local_player = entity.get_local_player
  40. local entity_get_all = entity.get_all
  41. local entity_get_players = entity.get_players
  42. local entity_get_classname = entity.get_classname
  43. local entity_set_prop = entity.set_prop
  44. local entity_get_prop = entity.get_prop
  45. local entity_is_enemy = entity.is_enemy
  46. local entity_get_player_name = entity.get_player_name
  47. local entity_get_player_weapon = entity.get_player_weapon
  48. local entity_hitbox_position = entity.hitbox_position
  49. local entity_get_steam64 = entity.get_steam64
  50. local entity_get_bounding_box = entity.get_bounding_box
  51. local entity_is_alive = entity.is_alive
  52. local entity_is_dormant = entity.is_dormant
  53.  
  54. local ui_new_checkbox = ui.new_checkbox
  55. local ui_new_slider = ui.new_slider
  56. local ui_new_combobox = ui.new_combobox
  57. local ui_new_multiselect = ui.new_multiselect
  58. local ui_new_hotkey = ui.new_hotkey
  59. local ui_new_button = ui.new_button
  60. local ui_new_color_picker = ui.new_color_picker
  61. local ui_reference = ui.reference
  62. local ui_set = ui.set
  63. local ui_get = ui.get
  64. local ui_set_callback = ui.set_callback
  65. local ui_set_visible = ui.set_visible
  66. local ui_is_menu_open = ui.is_menu_open
  67.  
  68. local math_floor = math.floor
  69. local math_random = math.random
  70. local math_sqrt = math.sqrt
  71. local table_insert = table.insert
  72. local table_remove = table.remove
  73. local table_size = table.getn
  74. local table_sort = table.sort
  75. local string_format = string.format
  76. local string_length = string.len
  77. local string_reverse = string.reverse
  78. local string_sub = string.sub
  79.  
  80. --[[
  81.  
  82. Author: NmChris
  83. Version: 1.0
  84. Functionality: Per weapon ragebot configs
  85.  
  86. Change log:
  87. N/A
  88.  
  89. To-Do:
  90. - Add multipoint type (High, Medium, Low)
  91.  
  92. ]]--
  93.  
  94. -- Menu
  95. local menu = {
  96.  
  97. adaptive_weapon_config = ui_new_checkbox("RAGE", "Other", "Adaptive weapon config"),
  98. adaptive_config = ui_new_combobox("RAGE", "Aimbot", "Weapon config", "Global", "Auto", "Scout", "AWP", "Pistols", "Desert Eagle", "R8 Revolver", "Rifles", "Machine guns", "Submachine guns", "Shotguns"),
  99. adaptive_hide = ui_new_checkbox("MISC", "Settings", "Hide adaptive weapon config"),
  100.  
  101. }
  102.  
  103. ui_set_visible(menu.adaptive_config, false)
  104. ui_set_visible(menu.adaptive_hide, false)
  105.  
  106. local mp_override = {
  107.  
  108. [24] = "Auto",
  109.  
  110. }
  111.  
  112. local hc_override = {
  113.  
  114. [0] = "Off",
  115.  
  116. }
  117.  
  118. local md_override = {
  119.  
  120. [0] = "Auto",
  121. [101] = "HP + 1",
  122. [102] = "HP + 2",
  123. [103] = "HP + 3",
  124. [104] = "HP + 4",
  125. [105] = "HP + 5",
  126. [106] = "HP + 6",
  127. [107] = "HP + 7",
  128. [108] = "HP + 8",
  129. [109] = "HP + 9",
  130. [110] = "HP + 10",
  131. [111] = "HP + 11",
  132. [112] = "HP + 12",
  133. [113] = "HP + 13",
  134. [114] = "HP + 14",
  135. [115] = "HP + 15",
  136. [116] = "HP + 16",
  137. [117] = "HP + 17",
  138. [118] = "HP + 18",
  139. [119] = "HP + 19",
  140. [120] = "HP + 20",
  141. [121] = "HP + 21",
  142. [122] = "HP + 22",
  143. [123] = "HP + 23",
  144. [124] = "HP + 24",
  145. [125] = "HP + 25",
  146. [126] = "HP + 26",
  147.  
  148. }
  149.  
  150. -- Adaptive
  151. local adaptive = {
  152.  
  153. global = {
  154.  
  155. target_selection = ui_new_combobox("RAGE", "Aimbot", "Global target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  156. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Global target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  157. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Global avoid limbs if moving"),
  158. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Global avoid head if jumping"),
  159. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Global multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  160. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Global multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  161. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Global dynamic multi-point"),
  162. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Global stomach hitbox scale", 1, 100, 0, true, "%"),
  163. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Global minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  164. min_damage = ui_new_slider("RAGE", "Aimbot", "Global minimum damage", 0, 126, 0, true, "%", 1, md_override),
  165. accuracy_boost = ui_new_combobox("RAGE", "Other", "Global accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  166. accuracy_options = ui_new_multiselect("RAGE", "Other", "Global accuracy boost options", "Refine shot", "Extended backtrack"),
  167. quickstop = ui_new_combobox("RAGE", "Other", "Global quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  168. fakelag_correction = ui_new_combobox("RAGE", "Other", "Global fake lag correction", "Off", "Delay shot", "Predict"),
  169. prefer_baim = ui_new_combobox("RAGE", "Other", "Global prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  170.  
  171. },
  172.  
  173. auto = {
  174.  
  175. target_selection = ui_new_combobox("RAGE", "Aimbot", "Auto target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  176. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Auto target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  177. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Auto avoid limbs if moving"),
  178. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Auto avoid head if jumping"),
  179. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Auto multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  180. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Auto multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  181. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Auto dynamic multi-point"),
  182. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Auto stomach hitbox scale", 1, 100, 0, true, "%"),
  183. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Auto minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  184. min_damage = ui_new_slider("RAGE", "Aimbot", "Auto minimum damage", 0, 126, 0, true, "%", 1, md_override),
  185. accuracy_boost = ui_new_combobox("RAGE", "Other", "Auto accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  186. accuracy_options = ui_new_multiselect("RAGE", "Other", "Auto accuracy boost options", "Refine shot", "Extended backtrack"),
  187. quickstop = ui_new_combobox("RAGE", "Other", "Auto quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  188. fakelag_correction = ui_new_combobox("RAGE", "Other", "Auto fake lag correction", "Off", "Delay shot", "Predict"),
  189. prefer_baim = ui_new_combobox("RAGE", "Other", "Auto prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  190.  
  191. },
  192.  
  193. scout = {
  194.  
  195. target_selection = ui_new_combobox("RAGE", "Aimbot", "Scout target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  196. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Scout target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  197. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Scout avoid limbs if moving"),
  198. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Scout avoid head if jumping"),
  199. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Scout multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  200. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Scout multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  201. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Scout dynamic multi-point"),
  202. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Scout stomach hitbox scale", 1, 100, 0, true, "%"),
  203. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Scout minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  204. min_damage = ui_new_slider("RAGE", "Aimbot", "Scout minimum damage", 0, 126, 0, true, "%", 1, md_override),
  205. accuracy_boost = ui_new_combobox("RAGE", "Other", "Scout accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  206. accuracy_options = ui_new_multiselect("RAGE", "Other", "Scout accuracy boost options", "Refine shot", "Extended backtrack"),
  207. quickstop = ui_new_combobox("RAGE", "Other", "Scout quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  208. fakelag_correction = ui_new_combobox("RAGE", "Other", "Scout fake lag correction", "Off", "Delay shot", "Predict"),
  209. prefer_baim = ui_new_combobox("RAGE", "Other", "Scout prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  210.  
  211. },
  212.  
  213. awp = {
  214.  
  215. target_selection = ui_new_combobox("RAGE", "Aimbot", "Awp target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  216. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Awp target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  217. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Awp avoid limbs if moving"),
  218. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Awp avoid head if jumping"),
  219. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Awp multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  220. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Awp multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  221. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Awp dynamic multi-point"),
  222. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Awp stomach hitbox scale", 1, 100, 0, true, "%"),
  223. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Awp minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  224. min_damage = ui_new_slider("RAGE", "Aimbot", "Awp minimum damage", 0, 126, 0, true, "%", 1, md_override),
  225. accuracy_boost = ui_new_combobox("RAGE", "Other", "Awp accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  226. accuracy_options = ui_new_multiselect("RAGE", "Other", "Awp accuracy boost options", "Refine shot", "Extended backtrack"),
  227. quickstop = ui_new_combobox("RAGE", "Other", "Awp quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  228. fakelag_correction = ui_new_combobox("RAGE", "Other", "Awp fake lag correction", "Off", "Delay shot", "Predict"),
  229. prefer_baim = ui_new_combobox("RAGE", "Other", "Awp prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  230.  
  231. },
  232.  
  233. pistols = {
  234.  
  235. target_selection = ui_new_combobox("RAGE", "Aimbot", "Pistol target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  236. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Pistol target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  237. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Pistol avoid limbs if moving"),
  238. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Pistol avoid head if jumping"),
  239. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Pistol multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  240. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Pistol multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  241. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Pistol dynamic multi-point"),
  242. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Pistol stomach hitbox scale", 1, 100, 0, true, "%"),
  243. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Pistol minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  244. min_damage = ui_new_slider("RAGE", "Aimbot", "Pistol minimum damage", 0, 126, 0, true, "%", 1, md_override),
  245. accuracy_boost = ui_new_combobox("RAGE", "Other", "Pistol accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  246. accuracy_options = ui_new_multiselect("RAGE", "Other", "Pistol accuracy boost options", "Refine shot", "Extended backtrack"),
  247. quickstop = ui_new_combobox("RAGE", "Other", "Pistol quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  248. fakelag_correction = ui_new_combobox("RAGE", "Other", "Pistol fake lag correction", "Off", "Delay shot", "Predict"),
  249. prefer_baim = ui_new_combobox("RAGE", "Other", "Pistol prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  250.  
  251. },
  252.  
  253. deagle = {
  254.  
  255. target_selection = ui_new_combobox("RAGE", "Aimbot", "Deagle target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  256. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Deagle target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  257. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Deagle avoid limbs if moving"),
  258. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Deagle avoid head if jumping"),
  259. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Deagle multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  260. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Deagle multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  261. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Deagle dynamic multi-point"),
  262. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Deagle stomach hitbox scale", 1, 100, 0, true, "%"),
  263. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Deagle minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  264. min_damage = ui_new_slider("RAGE", "Aimbot", "Deagle minimum damage", 0, 126, 0, true, "%", 1, md_override),
  265. accuracy_boost = ui_new_combobox("RAGE", "Other", "Deagle accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  266. accuracy_options = ui_new_multiselect("RAGE", "Other", "Deagle accuracy boost options", "Refine shot", "Extended backtrack"),
  267. quickstop = ui_new_combobox("RAGE", "Other", "Deagle quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  268. fakelag_correction = ui_new_combobox("RAGE", "Other", "Deagle fake lag correction", "Off", "Delay shot", "Predict"),
  269. prefer_baim = ui_new_combobox("RAGE", "Other", "Deagle prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  270.  
  271. },
  272.  
  273. revolver = {
  274.  
  275. target_selection = ui_new_combobox("RAGE", "Aimbot", "Revolver target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  276. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Revolver target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  277. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Revolver avoid limbs if moving"),
  278. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Revolver avoid head if jumping"),
  279. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Revolver multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  280. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Revolver multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  281. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Revolver dynamic multi-point"),
  282. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Revolver stomach hitbox scale", 1, 100, 0, true, "%"),
  283. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Revolver minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  284. min_damage = ui_new_slider("RAGE", "Aimbot", "Revolver minimum damage", 0, 126, 0, true, "%", 1, md_override),
  285. accuracy_boost = ui_new_combobox("RAGE", "Other", "Revolver accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  286. accuracy_options = ui_new_multiselect("RAGE", "Other", "Revolver accuracy boost options", "Refine shot", "Extended backtrack"),
  287. quickstop = ui_new_combobox("RAGE", "Other", "Revolver quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  288. fakelag_correction = ui_new_combobox("RAGE", "Other", "Revolver fake lag correction", "Off", "Delay shot", "Predict"),
  289. prefer_baim = ui_new_combobox("RAGE", "Other", "Revolver prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  290.  
  291. },
  292.  
  293. rifles = {
  294.  
  295. target_selection = ui_new_combobox("RAGE", "Aimbot", "Rifle target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  296. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Rifle target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  297. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Rifle avoid limbs if moving"),
  298. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Rifle avoid head if jumping"),
  299. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Rifle multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  300. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Rifle multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  301. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Rifle dynamic multi-point"),
  302. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Rifle stomach hitbox scale", 1, 100, 0, true, "%"),
  303. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Rifle minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  304. min_damage = ui_new_slider("RAGE", "Aimbot", "Rifle minimum damage", 0, 126, 0, true, "%", 1, md_override),
  305. accuracy_boost = ui_new_combobox("RAGE", "Other", "Rifle accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  306. accuracy_options = ui_new_multiselect("RAGE", "Other", "Rifle accuracy boost options", "Refine shot", "Extended backtrack"),
  307. quickstop = ui_new_combobox("RAGE", "Other", "Rifle quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  308. fakelag_correction = ui_new_combobox("RAGE", "Other", "Rifle fake lag correction", "Off", "Delay shot", "Predict"),
  309. prefer_baim = ui_new_combobox("RAGE", "Other", "Rifle prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  310.  
  311. },
  312.  
  313. machine_guns = {
  314.  
  315. target_selection = ui_new_combobox("RAGE", "Aimbot", "Machine gun target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  316. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Machine gun target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  317. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Machine gun avoid limbs if moving"),
  318. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Machine gun avoid head if jumping"),
  319. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Machine gun multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  320. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Machine gun multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  321. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Machine gun dynamic multi-point"),
  322. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Machine gun stomach hitbox scale", 1, 100, 0, true, "%"),
  323. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Machine gun minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  324. min_damage = ui_new_slider("RAGE", "Aimbot", "Machine gun minimum damage", 0, 126, 0, true, "%", 1, md_override),
  325. accuracy_boost = ui_new_combobox("RAGE", "Other", "Machine gun accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  326. accuracy_options = ui_new_multiselect("RAGE", "Other", "Machine gun accuracy boost options", "Refine shot", "Extended backtrack"),
  327. quickstop = ui_new_combobox("RAGE", "Other", "Machine gun quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  328. fakelag_correction = ui_new_combobox("RAGE", "Other", "Machine gun fake lag correction", "Off", "Delay shot", "Predict"),
  329. prefer_baim = ui_new_combobox("RAGE", "Other", "Machine gun prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  330.  
  331. },
  332.  
  333. submachine_guns = {
  334.  
  335. target_selection = ui_new_combobox("RAGE", "Aimbot", "Submachine gun target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  336. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Submachine gun target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  337. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Submachine gun avoid limbs if moving"),
  338. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Submachine gun avoid head if jumping"),
  339. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Submachine gun multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  340. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Submachine gun multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  341. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Submachine gun dynamic multi-point"),
  342. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Submachine gun stomach hitbox scale", 1, 100, 0, true, "%"),
  343. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Submachine gun minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  344. min_damage = ui_new_slider("RAGE", "Aimbot", "Submachine gun minimum damage", 0, 126, 0, true, "%", 1, md_override),
  345. accuracy_boost = ui_new_combobox("RAGE", "Other", "Submachine gun accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  346. accuracy_options = ui_new_multiselect("RAGE", "Other", "Submachine gun accuracy boost options", "Refine shot", "Extended backtrack"),
  347. quickstop = ui_new_combobox("RAGE", "Other", "Submachine gun quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  348. fakelag_correction = ui_new_combobox("RAGE", "Other", "Submachine gun fake lag correction", "Off", "Delay shot", "Predict"),
  349. prefer_baim = ui_new_combobox("RAGE", "Other", "Submachine gun prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  350.  
  351. },
  352.  
  353. shotguns = {
  354.  
  355. target_selection = ui_new_combobox("RAGE", "Aimbot", "Shotgun target selection", "Cycle", "Cycle (2x)", "Near crosshair", "Highest damage", "Lowest ping", "Best K/D ratio", "Best hit chance"),
  356. target_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Shotgun target hitbox", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  357. avoid_limbs = ui_new_checkbox("RAGE", "Aimbot", "Shotgun avoid limbs if moving"),
  358. avoid_head = ui_new_checkbox("RAGE", "Aimbot", "Shotgun avoid head if jumping"),
  359. multipoint_hitbox = ui_new_multiselect("RAGE", "Aimbot", "Shotgun multi-point", "Head", "Chest", "Stomach", "Arms", "Legs", "Feet"),
  360. multipoint_scale = ui_new_slider("RAGE", "Aimbot", "Shotgun multi-point scale", 24, 100, 0, true, "%", 1, mp_override),
  361. dynamic_multipoint = ui_new_checkbox("RAGE", "Aimbot", "Shotgun dynamic multi-point"),
  362. stomach_scale = ui_new_slider("RAGE", "Aimbot", "Shotgun stomach hitbox scale", 1, 100, 0, true, "%"),
  363. min_hitchance = ui_new_slider("RAGE", "Aimbot", "Shotgun minimum hit chance", 0, 100, 0, true, "%", 1, hc_override),
  364. min_damage = ui_new_slider("RAGE", "Aimbot", "Shotgun minimum damage", 0, 126, 0, true, "%", 1, md_override),
  365. accuracy_boost = ui_new_combobox("RAGE", "Other", "Shotgun accuracy boost", "Off", "Low", "Medium", "High", "Maximum"),
  366. accuracy_options = ui_new_multiselect("RAGE", "Other", "Shotgun accuracy boost options", "Refine shot", "Extended backtrack"),
  367. quickstop = ui_new_combobox("RAGE", "Other", "Shotgun quick stop", "Off", "On", "On + duck", "On + slide", "On + slide 2x"),
  368. fakelag_correction = ui_new_combobox("RAGE", "Other", "Shotgun fake lag correction", "Off", "Delay shot", "Predict"),
  369. prefer_baim = ui_new_combobox("RAGE", "Other", "Shotgun prefer body aim", "Off", "Always on", "Fake angles", "Aggressive", "High inaccuracy")
  370.  
  371. },
  372.  
  373. }
  374.  
  375. -- Reference
  376. local reference = {
  377.  
  378. target_selection = ui_reference("RAGE", "Aimbot", "Target selection"),
  379. target_hitbox = ui_reference("RAGE", "Aimbot", "Target hitbox"),
  380. avoid_limbs = ui_reference("RAGE", "Aimbot", "Avoid limbs if moving"),
  381. avoid_head = ui_reference("RAGE", "Aimbot", "Avoid head if jumping"),
  382. multipoint_hitbox = ui_reference("RAGE", "Aimbot", "Multi-point"),
  383. multipoint_scale = ui_reference("RAGE", "Aimbot", "Multi-point scale"),
  384. dynamic_multipoint = ui_reference("RAGE", "Aimbot", "Dynamic multi-point"),
  385. stomach_scale = ui_reference("RAGE", "Aimbot", "Stomach hitbox scale"),
  386. min_hitchance = ui_reference("RAGE", "Aimbot", "Minimum hit chance"),
  387. min_damage = ui_reference("RAGE", "Aimbot", "Minimum damage"),
  388. accuracy_boost = ui_reference("RAGE", "Other", "Accuracy boost"),
  389. accuracy_options = ui_reference("RAGE", "Other", "Accuracy boost options"),
  390. quickstop = ui_reference("RAGE", "Other", "Quick stop"),
  391. fakelag_correction = ui_reference("RAGE", "Other", "Fake lag correction"),
  392. prefer_baim = ui_reference("RAGE", "Other", "Prefer body aim")
  393.  
  394. }
  395.  
  396. -- Variables
  397. local variable = {
  398.  
  399. current_weapon = nil,
  400. current_item_index = nil,
  401. current_active_config = nil,
  402. current_menu = nil,
  403. current_key = nil,
  404. cached_key = nil
  405.  
  406. }
  407.  
  408. local function handle_menu()
  409.  
  410. if ui_get(menu.adaptive_weapon_config) == true then
  411.  
  412. ui_set_visible(menu.adaptive_config, true)
  413. ui_set_visible(menu.adaptive_hide, true)
  414.  
  415. for config, settings in pairs(adaptive) do
  416.  
  417. for setting_name, setting_reference in pairs(settings) do
  418.  
  419. if config == variable.current_key then
  420.  
  421. if ui_get(menu.adaptive_hide) == true then
  422.  
  423. ui_set_visible(setting_reference, false)
  424.  
  425. else
  426.  
  427. ui_set_visible(setting_reference, true)
  428.  
  429. end
  430.  
  431. end
  432.  
  433. end
  434.  
  435. end
  436.  
  437. else
  438.  
  439. ui_set_visible(menu.adaptive_config, false)
  440. ui_set_visible(menu.adaptive_hide, false)
  441.  
  442. for config, settings in pairs(adaptive) do
  443.  
  444. for setting_name, setting_reference in pairs(settings) do
  445.  
  446. ui_set_visible(setting_reference, false)
  447.  
  448. end
  449.  
  450. end
  451.  
  452. end
  453.  
  454. end
  455.  
  456. handle_menu()
  457. ui_set_callback(menu.adaptive_weapon_config, handle_menu)
  458. ui_set_callback(menu.adaptive_hide, handle_menu)
  459.  
  460. local function update_adaptive_config()
  461.  
  462. if variable.current_menu == nil then
  463.  
  464. variable.current_menu = ui_get(menu.adaptive_config)
  465.  
  466. end
  467.  
  468. if variable.current_menu ~= ui_get(menu.adaptive_config) then
  469.  
  470. variable.current_menu = ui_get(menu.adaptive_config)
  471.  
  472. end
  473.  
  474. if variable.current_menu == "Global" then
  475.  
  476. variable.cached_key = variable.current_key
  477. variable.current_key = "global"
  478.  
  479. elseif variable.current_menu == "Auto" then
  480.  
  481. variable.cached_key = variable.current_key
  482. variable.current_key = "auto"
  483.  
  484. elseif variable.current_menu == "Scout" then
  485.  
  486. variable.cached_key = variable.current_key
  487. variable.current_key = "scout"
  488.  
  489. elseif variable.current_menu == "AWP" then
  490.  
  491. variable.cached_key = variable.current_key
  492. variable.current_key = "awp"
  493.  
  494. elseif variable.current_menu == "Pistols" then
  495.  
  496. variable.cached_key = variable.current_key
  497. variable.current_key = "pistols"
  498.  
  499. elseif variable.current_menu == "Desert Eagle" then
  500.  
  501. variable.cached_key = variable.current_key
  502. variable.current_key = "deagle"
  503.  
  504. elseif variable.current_menu == "R8 Revolver" then
  505.  
  506. variable.cached_key = variable.current_key
  507. variable.current_key = "revolver"
  508.  
  509. elseif variable.current_menu == "Rifles" then
  510.  
  511. variable.cached_key = variable.current_key
  512. variable.current_key = "rifles"
  513.  
  514. elseif variable.current_menu == "Machine guns" then
  515.  
  516. variable.cached_key = variable.current_key
  517. variable.current_key = "machine_guns"
  518.  
  519. elseif variable.current_menu == "Submachine guns" then
  520.  
  521. variable.cached_key = variable.current_key
  522. variable.current_key = "submachine_guns"
  523.  
  524. elseif variable.current_menu == "Shotguns" then
  525.  
  526. variable.cached_key = variable.current_key
  527. variable.current_key = "shotguns"
  528.  
  529. end
  530.  
  531. if ui_get(menu.adaptive_hide) == true then
  532.  
  533. return
  534.  
  535. else
  536.  
  537. for config, settings in pairs(adaptive) do
  538.  
  539. for setting_name, setting_reference in pairs(settings) do
  540.  
  541. if config == variable.cached_key then
  542.  
  543. ui_set_visible(setting_reference, false)
  544.  
  545. end
  546.  
  547. if config == variable.current_key then
  548.  
  549. ui_set_visible(setting_reference, true)
  550.  
  551. end
  552.  
  553. end
  554.  
  555. end
  556.  
  557. end
  558.  
  559. end
  560.  
  561. ui_set_callback(menu.adaptive_config, update_adaptive_config)
  562.  
  563. local function handle_adaptive_menu()
  564.  
  565. for config, settings in pairs(adaptive) do
  566.  
  567. if #ui_get(settings.target_hitbox) == 0 then
  568.  
  569. ui_set(settings.target_hitbox, "Head")
  570.  
  571. end
  572.  
  573. if config == variable.current_key then
  574.  
  575. if variable.current_active_config == variable.current_menu then
  576.  
  577. ui_set(reference.target_selection, ui_get(settings.target_selection))
  578. ui_set(reference.target_hitbox, ui_get(settings.target_hitbox))
  579. ui_set(reference.avoid_limbs, ui_get(settings.avoid_limbs))
  580. ui_set(reference.avoid_head, ui_get(settings.avoid_head))
  581. ui_set(reference.multipoint_hitbox, ui_get(settings.multipoint_hitbox))
  582. ui_set(reference.multipoint_scale, ui_get(settings.multipoint_scale))
  583. ui_set(reference.dynamic_multipoint, ui_get(settings.dynamic_multipoint))
  584. ui_set(reference.stomach_scale, ui_get(settings.stomach_scale))
  585. ui_set(reference.min_hitchance, ui_get(settings.min_hitchance))
  586. ui_set(reference.min_damage, ui_get(settings.min_damage))
  587. ui_set(reference.accuracy_boost, ui_get(settings.accuracy_boost))
  588. ui_set(reference.accuracy_options, ui_get(settings.accuracy_options))
  589. ui_set(reference.quickstop, ui_get(settings.quickstop))
  590. ui_set(reference.fakelag_correction, ui_get(settings.fakelag_correction))
  591. ui_set(reference.prefer_baim, ui_get(settings.prefer_baim))
  592.  
  593. end
  594.  
  595. end
  596.  
  597. end
  598.  
  599. end
  600.  
  601. for config, settings in pairs(adaptive) do
  602.  
  603. for setting_name, setting_reference in pairs(settings) do
  604.  
  605. ui_set_callback(setting_reference, handle_adaptive_menu)
  606.  
  607. end
  608.  
  609. end
  610.  
  611. local function set_config(config)
  612.  
  613. if variable.current_active_config == config and variable.current_active_config ~= nil then
  614.  
  615. return
  616.  
  617. end
  618.  
  619. if config == "Global" then
  620.  
  621. variable.current_active_config = "Global"
  622. ui_set(menu.adaptive_config, "Global")
  623.  
  624. update_adaptive_config()
  625. client_console_log("Global config loaded.")
  626.  
  627. elseif config == "Auto" then
  628.  
  629. variable.current_active_config = "Auto"
  630. ui_set(menu.adaptive_config, "Auto")
  631.  
  632. update_adaptive_config()
  633. client_console_log("Auto config loaded.")
  634.  
  635. elseif config == "Scout" then
  636.  
  637. variable.current_active_config = "Scout"
  638. ui_set(menu.adaptive_config, "Scout")
  639.  
  640. update_adaptive_config()
  641. client_console_log("Scout config loaded.")
  642.  
  643. elseif config == "AWP" then
  644.  
  645. variable.current_active_config = "AWP"
  646. ui_set(menu.adaptive_config, "AWP")
  647.  
  648. update_adaptive_config()
  649. client_console_log("AWP config loaded.")
  650.  
  651. elseif config == "Pistols" then
  652.  
  653. variable.current_active_config = "Pistols"
  654. ui_set(menu.adaptive_config, "Pistols")
  655.  
  656. update_adaptive_config()
  657. client_console_log("Pistols config loaded.")
  658.  
  659. elseif config == "Desert Eagle" then
  660.  
  661. variable.current_active_config = "Desert Eagle"
  662. ui_set(menu.adaptive_config, "Desert Eagle")
  663.  
  664. update_adaptive_config()
  665. client_console_log("Desert Eagle config loaded.")
  666.  
  667. elseif config == "R8 Revolver" then
  668.  
  669. variable.current_active_config = "R8 Revolver"
  670. ui_set(menu.adaptive_config, "R8 Revolver")
  671.  
  672. update_adaptive_config()
  673. client_console_log("R8 Revolver config loaded.")
  674.  
  675. elseif config == "Rifles" then
  676.  
  677. variable.current_active_config = "Rifles"
  678. ui_set(menu.adaptive_config, "Rifles")
  679.  
  680. update_adaptive_config()
  681. client_console_log("Rifles config loaded.")
  682.  
  683. elseif config == "Machine guns" then
  684.  
  685. variable.current_active_config = "Machine guns"
  686. ui_set(menu.adaptive_config, "Machine guns")
  687.  
  688. update_adaptive_config()
  689. client_console_log("Machine guns config loaded.")
  690.  
  691. elseif config == "Submachine guns" then
  692.  
  693. variable.current_active_config = "Submachine guns"
  694. ui_set(menu.adaptive_config, "Submachine guns")
  695.  
  696. update_adaptive_config()
  697. client_console_log("Submachine guns config loaded.")
  698.  
  699. elseif config == "Shotguns" then
  700.  
  701. variable.current_active_config = "Shotguns"
  702. ui_set(menu.adaptive_config, "Shotguns")
  703.  
  704. update_adaptive_config()
  705. client_console_log("Shotguns config loaded.")
  706.  
  707. else
  708.  
  709. client_console_log("Error loading config: ", config)
  710.  
  711. end
  712.  
  713. for config, settings in pairs(adaptive) do
  714.  
  715. if config == variable.current_key then
  716.  
  717. ui_set(reference.target_selection, ui_get(settings.target_selection))
  718. ui_set(reference.target_hitbox, ui_get(settings.target_hitbox))
  719. ui_set(reference.avoid_limbs, ui_get(settings.avoid_limbs))
  720. ui_set(reference.avoid_head, ui_get(settings.avoid_head))
  721. ui_set(reference.multipoint_hitbox, ui_get(settings.multipoint_hitbox))
  722. ui_set(reference.multipoint_scale, ui_get(settings.multipoint_scale))
  723. ui_set(reference.dynamic_multipoint, ui_get(settings.dynamic_multipoint))
  724. ui_set(reference.stomach_scale, ui_get(settings.stomach_scale))
  725. ui_set(reference.min_hitchance, ui_get(settings.min_hitchance))
  726. ui_set(reference.min_damage, ui_get(settings.min_damage))
  727. ui_set(reference.accuracy_boost, ui_get(settings.accuracy_boost))
  728. ui_set(reference.accuracy_options, ui_get(settings.accuracy_options))
  729. ui_set(reference.quickstop, ui_get(settings.quickstop))
  730. ui_set(reference.fakelag_correction, ui_get(settings.fakelag_correction))
  731. ui_set(reference.prefer_baim, ui_get(settings.prefer_baim))
  732.  
  733. end
  734.  
  735. end
  736.  
  737. end
  738.  
  739. local function get_weapon(entindex)
  740.  
  741. local weapon_id = entity_get_player_weapon(entindex)
  742. local weapon_item_index = entity_get_prop(weapon_id, "m_iItemDefinitionIndex")
  743.  
  744. if variable.current_item_index == weapon_item_index and variable.current_item_index ~= nil then
  745.  
  746. return variable.current_weapon
  747.  
  748. end
  749.  
  750. if weapon_item_index > 200000 then
  751.  
  752. weapon_item_index = weapon_item_index % 65536
  753.  
  754. end
  755.  
  756. if weapon_item_index == 1 then
  757.  
  758. variable.current_weapon = "Desert Eagle"
  759. variable.current_item_index = weapon_item_index
  760. set_config("Desert Eagle")
  761.  
  762. elseif weapon_item_index == 2 then
  763.  
  764. variable.current_weapon = "Dual Berettas"
  765. variable.current_item_index = weapon_item_index
  766. set_config("Pistols")
  767.  
  768. elseif weapon_item_index == 3 then
  769.  
  770. variable.current_weapon = "Five-SeveN"
  771. variable.current_item_index = weapon_item_index
  772. set_config("Pistols")
  773.  
  774. elseif weapon_item_index == 4 then
  775.  
  776. variable.current_weapon = "Glock-18"
  777. variable.current_item_index = weapon_item_index
  778. set_config("Pistols")
  779.  
  780. elseif weapon_item_index == 7 then
  781.  
  782. variable.current_weapon = "AK-47"
  783. variable.current_item_index = weapon_item_index
  784. set_config("Rifles")
  785.  
  786. elseif weapon_item_index == 8 then
  787.  
  788. variable.current_weapon = "AUG"
  789. variable.current_item_index = weapon_item_index
  790. set_config("Rifles")
  791.  
  792. elseif weapon_item_index == 9 then
  793.  
  794. variable.current_weapon = "AWP"
  795. variable.current_item_index = weapon_item_index
  796. set_config("AWP")
  797.  
  798. elseif weapon_item_index == 10 then
  799.  
  800. variable.current_weapon = "FAMAS"
  801. variable.current_item_index = weapon_item_index
  802. set_config("Rifles")
  803.  
  804. elseif weapon_item_index == 11 then
  805.  
  806. variable.current_weapon = "G3SG1"
  807. variable.current_item_index = weapon_item_index
  808. set_config("Auto")
  809.  
  810. elseif weapon_item_index == 13 then
  811.  
  812. variable.current_weapon = "Galil AR"
  813. variable.current_item_index = weapon_item_index
  814. set_config("Rifles")
  815.  
  816. elseif weapon_item_index == 14 then
  817.  
  818. variable.current_weapon = "M249"
  819. variable.current_item_index = weapon_item_index
  820. set_config("Machine guns")
  821.  
  822. elseif weapon_item_index == 16 then
  823.  
  824. variable.current_weapon = "M4A4"
  825. variable.current_item_index = weapon_item_index
  826. set_config("Rifles")
  827.  
  828. elseif weapon_item_index == 17 then
  829.  
  830. variable.current_weapon = "MAC-10"
  831. variable.current_item_index = weapon_item_index
  832. set_config("Submachine guns")
  833.  
  834. elseif weapon_item_index == 19 then
  835.  
  836. variable.current_weapon = "P90"
  837. variable.current_item_index = weapon_item_index
  838. set_config("Submachine guns")
  839.  
  840. elseif weapon_item_index == 23 then
  841.  
  842. variable.current_weapon = "MP5-SD"
  843. variable.current_item_index = weapon_item_index
  844. set_config("Submachine guns")
  845.  
  846. elseif weapon_item_index == 24 then
  847.  
  848. variable.current_weapon = "UMP-45"
  849. variable.current_item_index = weapon_item_index
  850. set_config("Submachine guns")
  851.  
  852. elseif weapon_item_index == 25 then
  853.  
  854. variable.current_weapon = "XM1014"
  855. variable.current_item_index = weapon_item_index
  856. set_config("Shotguns")
  857.  
  858. elseif weapon_item_index == 26 then
  859.  
  860. variable.current_weapon = "PP-Bizon"
  861. variable.current_item_index = weapon_item_index
  862. set_config("Submachine guns")
  863.  
  864. elseif weapon_item_index == 27 then
  865.  
  866. variable.current_weapon = "MAG-7"
  867. variable.current_item_index = weapon_item_index
  868. set_config("Shotguns")
  869.  
  870. elseif weapon_item_index == 28 then
  871.  
  872. variable.current_weapon = "Negev"
  873. variable.current_item_index = weapon_item_index
  874. set_config("Machine guns")
  875.  
  876. elseif weapon_item_index == 29 then
  877.  
  878. variable.current_weapon = "Sawed-Off"
  879. variable.current_item_index = weapon_item_index
  880. set_config("Shotguns")
  881.  
  882. elseif weapon_item_index == 30 then
  883.  
  884. variable.current_weapon = "Tec-9"
  885. variable.current_item_index = weapon_item_index
  886. set_config("Pistols")
  887.  
  888. elseif weapon_item_index == 32 then
  889.  
  890. variable.current_weapon = "P2000"
  891. variable.current_item_index = weapon_item_index
  892. set_config("Pistols")
  893.  
  894. elseif weapon_item_index == 33 then
  895.  
  896. variable.current_weapon = "MP7"
  897. variable.current_item_index = weapon_item_index
  898. set_config("Submachine guns")
  899.  
  900. elseif weapon_item_index == 34 then
  901.  
  902. variable.current_weapon = "MP9"
  903. variable.current_item_index = weapon_item_index
  904. set_config("Submachine guns")
  905.  
  906. elseif weapon_item_index == 35 then
  907.  
  908. variable.current_weapon = "Nova"
  909. variable.current_item_index = weapon_item_index
  910. set_config("Shotguns")
  911.  
  912. elseif weapon_item_index == 36 then
  913.  
  914. variable.current_weapon = "P250"
  915. variable.current_item_index = weapon_item_index
  916. set_config("Pistols")
  917.  
  918. elseif weapon_item_index == 38 then
  919.  
  920. variable.current_weapon = "SCAR-20"
  921. variable.current_item_index = weapon_item_index
  922. set_config("Auto")
  923.  
  924. elseif weapon_item_index == 39 then
  925.  
  926. variable.current_weapon = "SG 553"
  927. variable.current_item_index = weapon_item_index
  928. set_config("Rifles")
  929.  
  930. elseif weapon_item_index == 40 then
  931.  
  932. variable.current_weapon = "SSG 08"
  933. variable.current_item_index = weapon_item_index
  934. set_config("Scout")
  935.  
  936. elseif weapon_item_index == 60 then
  937.  
  938. variable.current_weapon = "M4A1-S"
  939. variable.current_item_index = weapon_item_index
  940. set_config("Rifles")
  941.  
  942. elseif weapon_item_index == 61 then
  943.  
  944. variable.current_weapon = "USP-S"
  945. variable.current_item_index = weapon_item_index
  946. set_config("Pistols")
  947.  
  948. elseif weapon_item_index == 63 then
  949.  
  950. variable.current_weapon = "CZ75-Auto"
  951. variable.current_item_index = weapon_item_index
  952. set_config("Pistols")
  953.  
  954. elseif weapon_item_index == 64 then
  955.  
  956. variable.current_weapon = "R8 Revolver"
  957. variable.current_item_index = weapon_item_index
  958. set_config("R8 Revolver")
  959.  
  960. else
  961.  
  962. variable.current_weapon = "Other"
  963. variable.current_item_index = weapon_item_index
  964. set_config("Global")
  965.  
  966. end
  967.  
  968. return variable.current_weapon
  969.  
  970. end
  971.  
  972. local function on_run_command(e)
  973.  
  974. if ui_get(menu.adaptive_weapon_config) == false then
  975.  
  976. return
  977.  
  978. end
  979.  
  980. local local_player = entity_get_local_player()
  981.  
  982. if not entity_is_alive(local_player) or local_player == nil then
  983.  
  984. return
  985.  
  986. end
  987.  
  988. if variable.current_weapon ~= get_weapon(local_player) then
  989.  
  990. get_weapon(local_player)
  991.  
  992. end
  993.  
  994. end
  995.  
  996. client_set_event_callback("run_command", on_run_command)
Add Comment
Please, Sign In to add comment