> ## Documentation Index
> Fetch the complete documentation index at: https://lua.wingless.one/llms.txt
> Use this file to discover all available pages before exploring further.

# Schema

> Access to Source 2 schema offsets at runtime.

Access to Source 2 schema offsets at runtime.

## Functions

```lua theme={null}
local off = schema.offset('C_CSPlayerPawn', 'm_iHealth')
-- returns integer offset, or nil
```

Use with `entity:get` and `entity:set` when you need a field not covered by the built-in entity methods.

## Example

```lua theme={null}
local off_armor = schema.offset('C_CSPlayerPawn', 'm_ArmorValue')

events.on('paint', function()
    local me = entity.local_pawn()
    if me and me:alive() and off_armor then
        local armor = me:get(off_armor, 'int')
        render.text(10, 10, color(255, 255, 255), 'Armor: ' .. armor, 's')
    end
end)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.