- Documentation
- Server functions
- removeDebugHook
Function
removeDebugHook
Detaches a function added with addDebugHook.
Syntax
bool removeDebugHook(string hookType, function callbackFunction)Arguments
hookTypestring- The hook type.
callbackFunctionfunction- The function.
Returns
true if the function was detached.
Example
local function trace(resource, eventName) outputServerLog(eventName) end
addDebugHook("preEvent", trace)
setTimer(removeDebugHook, 5000, 1, "preEvent", trace)