> For the complete documentation index, see [llms.txt](https://tyrix.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tyrix.gitbook.io/docs/script-resources/tyrix-frames/exports.md).

# Exports

Two server exports. Both are server-side only — a client cannot reach either.

## StartPlacement

```lua
exports.tyrix_frames:StartPlacement(source, size)
```

Puts a player into placement mode for the given canvas size, exactly as if they had used the item.

| Parameter   | Type      | Notes                                                             |
| ----------- | --------- | ----------------------------------------------------------------- |
| `source`    | `number`  | Player server id                                                  |
| `size`      | `string`  | One of `8x8`, `8x10`, `11x14`, `12x12`, `16x20`, `20x24`, `20x30` |
| **returns** | `boolean` | `false` for an unknown size or an invalid player                  |

This is the entry point for a shop, reward, job or menu resource that wants to grant a placement directly. It is the primary way canvases are obtained in [Standalone](/docs/script-resources/tyrix-frames/standalone.md).

```lua
-- your shop resource
RegisterNetEvent('myshop:boughtCanvas', function(size)
    local src = source
    if not exports.tyrix_frames:StartPlacement(src, size) then
        -- unknown size, or the player left
    end
end)
```

{% hint style="warning" %}
**A `true` return does not mean a canvas was placed.** It means placement mode was requested. The player still has to aim and confirm, and the server still applies every gate at commit time:
{% endhint %}

* alive, and not in a vehicle
* rate limited
* under `Config.PlacementLimit`
* **on an item-based inventory, still holding the item**

That last point matters. On a server with an inventory, calling this export does *not* let a player place for free — the place callback re-checks the slot authoritatively and refuses without the item. If you want free placement, run itemless.

## useFrame

```lua
exports.tyrix_frames:useFrame(event, item, inventory, slot)
```

The ox\_inventory use hook. **You do not call this** — ox does, because the item definition carries `server = { export = 'tyrix_frames.useFrame' }`. It is documented only so nobody wonders what it is or removes it from the item table.

It ignores anything where `event ~= 'usingItem'`.

qb-inventory and ESX do not use this path: those frameworks own the usable-item registry, so the script registers each item with them at startup instead.

## Notes for integrators

There is no export to place a canvas outright, on purpose. Every canvas is positioned by a player through the placement UI, which is what guarantees it ends up somewhere reachable and validated — the server rejectss any final position more than 10 m from the player.

If you need canvases placed programmatically for a build or an event, place them as an admin and they persist like any other.
