> For the complete documentation index, see [llms.txt](https://pellix-1.gitbook.io/pellix-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pellix-1.gitbook.io/pellix-docs/callbacks/local.md). Agents can also search and read this documentation through its [MCP server](https://pellix-1.gitbook.io/pellix-docs/~gitbook/mcp).

# local

Executes every time when basic local player data was retrieved.

```lua
local(player: entity)
```

This callback can be registered by calling [set\_callback](https://pellix-1.gitbook.io/pellix-docs/functions/set_callback.md).

**Example:**

```lua
local health_offset = schema.get("C_BaseEntity", "m_iHealth")

local function on_local(player)
    local health = player:get_int(health_offset)
    print(health)
end

set_callback("local", on_local)
```
