Garry's Mod Wiki


  function, string, number debug.gethook( thread thread = nil )


We advise against using this. It may be changed or removed in a future update.

Returns the current hook settings of the passed thread. The thread argument can be omitted. This is completely different to gamemode hooks. More information on hooks can be found at This function will simply return the function, mask, and count of the last called debug.sethook.


1 thread thread = nil
Which thread to retrieve it's hook from, doesn't seem to actually work.


1 function
Hook function.
2 string
Hook mask. This is reversed of the debug.sethook mask ("clr" would be "rlc").
3 number
Hook count.