debug.sethook

From Garry's Mod
Revision as of 21:49, 4 June 2013 by Willox (Talk | contribs)
Jump to: navigation, search
 debug.sethook( )

Contents

Description

Sets the given function as a Lua hook. This is completely different to gamemode hooks. The thread argument can be completely omitted and calling this function with no arguments will remove the current hook. This is used by default for infinite loop detection. More information on hooks is available here [[1]]

Arguments

thread thread

Thread to set the hook on. This argument can be omited

Arguments

function hook

Function for the hook to call

Arguments

string mask

The hook's mask

Arguments

number count

How often to call the hook (in instructions). 0 for infinite
Personal tools
Navigation