# g\_hooking

- [register\_D3D\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/register_d3d_hook.md): Registers a function which gets called on every frame. It returns an ID used for unregistering the hook.
- [register\_wndproc\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/register_wndproc_hook.md): Registers a function which gets called on every input. It returns an ID used for unregistering the hook.
- [register\_scripted\_game\_event\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/register_scripted_game_event_hook.md): Registers a function which gets called on every received scripted game event. It returns an ID used for unregistering the hook. Hoook should either return true or false.
- [unregister\_hook](https://docs.cherax.vip/lua-documentation/api-reference/g_hooking/unregister_hook.md): Removes hook by given id.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cherax.vip/lua-documentation/api-reference/g_hooking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
