Advertisement
AnonGaming

Untitled

Jan 3rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. local funcs = {}
  2.  
  3. function funcs.Detour(old, new, name)
  4.     print("Detouring: "..name)
  5.     funcs.D[new] = old
  6.     return new
  7. end
  8.  
  9. local plyMeta = FindMetaTable("Player")
  10.  
  11. local concommandDet = plyMeta.ConCommand
  12. plyMeta.ConCommand = funcs.Detour(plyMeta.ConCommand, function(pl,cmd,...)
  13.    
  14.     return concommandDet(pl,cmd,...)
  15.  
  16. end, "plyMeta.ConCommand")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement