ReferenceClosures

oth.unhook

Removes an oth hook from a function.

Syntax

oth.unhook(target: function) -> boolean

Parameters

ParameterTypeDescription
targetfunctionPreviously hooked target.

Returns

TypeDescription
booleanWhether a matching hook was removed.

Description

Pass the target used when calling oth.hook, not a newly created equivalent function. This does not cancel unrelated scheduled tasks or other signal hooks.

Example

local function target() return 1 end
print(oth.unhook(target))

These are Game executor contracts. Check build requirements and session lifetimes before using them.