Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. -- Hit Marker ----------------------------------------------------------------------------------------------------------------------------------------------------------
  2.  
  3. local globals_realtime = globals.realtime
  4. local globals_curtime = globals.curtime
  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_console_cmd = client.exec
  13. local client_userid_to_entindex = client.userid_to_entindex
  14. local client_get_cvar = client.get_cvar
  15. local client_draw_debug_text = client.draw_debug_text
  16. local client_draw_hitboxes = client.draw_hitboxes
  17. local client_random_int = client.random_int
  18. local client_random_float = client.random_float
  19. local client_draw_text = client.draw_text
  20. local client_draw_rectangle = client.draw_rectangle
  21. local client_draw_line = client.draw_line
  22. local client_world_to_screen = client.world_to_screen
  23. local client_is_local_player = client.is_local_player
  24. local client_delay_call = client.delay_call
  25. local client_visible = client.visible
  26.  
  27. local ui_new_checkbox = ui.new_checkbox
  28. local ui_new_slider = ui.new_slider
  29. local ui_new_button = ui.new_button
  30. local ui_new_combobox = ui.new_combobox
  31. local ui_new_hotkey = ui.new_hotkey
  32. local ui_set = ui.set
  33. local ui_get = ui.get
  34.  
  35. local entity_get_local_player = entity.get_local_player
  36. local entity_get_all = entity.get_all
  37. local entity_get_players = entity.get_players
  38. local entity_get_classname = entity.get_classname
  39. local entity_set_prop = entity.set_prop
  40. local entity_get_prop = entity.get_prop
  41. local entity_is_enemy = entity.is_enemy
  42. local entity_get_player_name = entity.get_player_name
  43. local entity_get_player_weapon = entity.get_player_weapon
  44.  
  45. local to_number = tonumber
  46. local math_floor = math.floor
  47. local table_insert = table.insert
  48. local table_remove = table.remove
  49. local string_format = string.format
  50.  
  51. local hitsounds_combo = ui_new_combobox("VISUALS", "Player ESP", "Hitmarker Sound", "Disabled", "bameware", "aimware", "thatguy", "teddy bear")
  52.  
  53. local function on_player_hurt(e)
  54.  
  55. local attackerUID = e.attacker
  56. local hitsounds_combo_current = ui_get(hitsounds_combo)
  57.  
  58. if attackerUID == nil then
  59.  
  60. return
  61.  
  62. end
  63.  
  64. local attackerEntIndex = client_userid_to_entindex(attackerUID)
  65.  
  66. if attackerEntIndex == entity_get_local_player() then
  67.  
  68. if hitsounds_combo_current == "Disabled" then
  69.  
  70. return
  71.  
  72. elseif hitsounds_combo_current == "bameware" then
  73.  
  74. client_console_cmd("play bameware.mp3")
  75.  
  76. elseif hitsounds_combo_current == "aimware" then
  77.  
  78. client_console_cmd("play aimware.wav")
  79.  
  80. elseif hitsounds_combo_current == "thatguy" then
  81.  
  82. client_console_cmd("play thatguy.mp3")
  83.  
  84. elseif hitsounds_combo_current == "teddy bear" then
  85.  
  86. client_console_cmd("play teddybear.mp3")
  87. end
  88.  
  89. end
  90.  
  91. end
  92.  
  93. client_set_event_callback("player_hurt", on_player_hurt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement