Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. /*
  2.     Hackcraft's ULX blind detour (Idea from crazyzultan)
  3. */
  4.  
  5. local hooks = hook.GetTable()
  6. local HOOKADD = HOOKADD or hook.Add
  7. local badHooks = {
  8.     ["HUDPaint"] = {
  9.         ["ulx_blind"] = true
  10.     }
  11. }
  12.  
  13. for eventName, t in pairs(badHooks) do
  14.     if hooks[eventName] then
  15.         for identifier, func in pairs(t) do
  16.             if hooks[eventName][identifier] then
  17.                 hook.Remove(eventName, identifier)
  18.             end
  19.         end
  20.     end
  21. end
  22.  
  23. function hook.Add(eventName, identifier, func)
  24.     if badHooks[eventName] and badHooks[eventName][identifier] then
  25.         return
  26.     else
  27.         return HOOKADD(eventName, identifier, func)
  28.     end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement