ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. removeDebugHook

Function

removeDebugHook

ServerMiscellaneousIdentical to MTA:SA

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)

See also