Garry's Mod Wiki

debug.gethook

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

Description

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 http://www.lua.org/pil/23.2.html. This function will simply return the function, mask, and count of the last called debug.sethook.

Arguments

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

Returns

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