isfunctionhooked
Checks whether a function is currently hooked.
Syntax
isfunctionhooked(func: function) -> boolean
Also available as
isfunchookedis_function_hooked
Parameters
| Parameter | Type | Description |
|---|---|---|
func | function | The function to check. |
Returns
| Type | Description |
|---|---|
boolean | true while the function is hooked with hookfunction or hookmetamethod. |
Description
It returns true from the moment a function is hooked until it is restored with restorefunction.
Example
local function f() end
print(isfunctionhooked(f))
hookfunction(f, function() end)
print(isfunctionhooked(f))
restorefunction(f)
print(isfunctionhooked(f))
These are Game executor contracts. Check build requirements and session lifetimes before using them.
