RemoveDebugHook
From Multi Theft Auto: Wiki
This function removes hooks added by addDebugHook
Syntax
bool removeDebugHook( string hookType, function callbackFunction )
Required Arguments
- hookType: The type of hook to remove. This can be:
- preEvent
- postEvent
- preFunction
- postFunction
- callbackFunction : The callback function to remove
Returns
Returns true if the hook was successfully removed, or false otherwise.
Example
This example adds a hook, then removes it:
function onPreEvent( sourceResource, eventName, eventSource, eventClient, luaFilename, luaLineNumber, ... ) end addDebugHook( "preEvent", onPreEvent ) removeDebugHook( "preEvent", onPreEvent )
Changelog
Version | Description |
---|
1.3.5-9.06054 | Added clientside |
Requirements
Minimum supported server | 1.3.4-9.05939 |
---|---|
Minimum supported client | 1.3.5-9.06054 |
Note: Using this function requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.3.4-9.05939" client="1.3.5-9.06054" />
See Also
- bitAnd
- bitNot
- bitOr
- bitXor
- bitTest
- bitLRotate
- bitRRotate
- bitLShift
- bitRShift
- bitArShift
- bitExtract
- bitReplace
- debugSleep
- decodeString
- encodeString
- fromJSON
- getColorFromString
- getDevelopmentMode
- getDistanceBetweenPoints2D
- getDistanceBetweenPoints3D
- getEasingValue
- getFPSLimit
- getNetworkStats
- getNetworkUsageData
- getPerformanceStats
- getRealTime
- getServerConfigSetting
- getTickCount
- getTimerDetails
- getTimers
- gettok
- getUserdataType
- getVersion
- hash
- inspect
- interpolateBetween
- iprint
- isOOPEnabled
- isTimer
- killTimer
- md5
- passwordHash
- passwordVerify
- pregFind
- pregMatch
- pregReplace
- removeDebugHook
- resetTimer
- setDevelopmentMode
- setFPSLimit
- setServerConfigSetting
- setTimer
- sha256
- split
- teaDecode
- teaEncode