isprotohooked
Checks whether a prototype is currently hooked. It returns false for functions that were never hooked, including C functions.
Syntax
isprotohooked(proto: function) -> boolean
Parameters
| Parameter | Type | Description |
|---|---|---|
proto | function | A function from debug.getproto. |
Returns
| Type | Description |
|---|---|
boolean | true while the prototype is hooked with hookproto. |
Example
local function outer()
local function inner() end
return inner
end
local proto = debug.getproto(outer, 1)
print(isprotohooked(proto))
hookproto(proto, function() end)
print(isprotohooked(proto))
restoreproto(proto)
These are Game executor contracts. Check build requirements and session lifetimes before using them.
