ax.hook¶
Source: gamemode/framework/libraries/sh_hook.lua
Hook attachment system that registers every function member of a table as its own
Documented functions: 2
Functions¶
ax.hook:AttachHooks(tbl, identifier)¶
Attach every function member of the given table as an individual hook.Add handler.
Any existing attachment under the same identifier is removed first, so this is safe
to call again on hot reload.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
tbl |
table |
The table whose functions should be registered as hooks (e.g. SCHEMA, a MODULE table). |
identifier |
string |
A unique identifier used to namespace the underlying hook names. |
ax.hook:DetachHooks(identifier)¶
Detach all hooks previously attached under the given identifier.
Realm: shared
Parameters
| Name | Type | Description |
|---|---|---|
identifier |
string |
The identifier passed to ax.hook:AttachHooks. |