> For the complete documentation index, see [llms.txt](https://zloma-scripts.gitbook.io/zloma-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zloma-scripts.gitbook.io/zloma-scripts/zloma_stance-free-escrow/api-reference/events.md).

# Events

zloma\_stance uses a small set of network events for persistence and spawn reapply.

***

## Active Network Events

| Event                              | Direction                    | Description                                       |
| ---------------------------------- | ---------------------------- | ------------------------------------------------- |
| `zloma_stance:saveWheels`          | Client -> Server             | Saves the current stance/camber payload by plate  |
| `zloma_stance:requestApplyOnSpawn` | Client/Integration -> Server | Requests saved fitment for a just-spawned vehicle |
| `zloma_stance:applyOnSpawn`        | Server -> Client             | Applies saved fitment to a networked vehicle      |

***

## `zloma_stance:saveWheels`

Triggered by the client after the player confirms the tuning UI.

```lua
TriggerServerEvent('zloma_stance:saveWheels', plate, data)
```

`data` is saved in database format:

```lua
{
    stance = { fl = 0.0, fr = 0.0, rl = 0.0, rr = 0.0 },
    camber = { fl = 0.0, fr = 0.0, rl = 0.0, rr = 0.0 }
}
```

***

## `zloma_stance:requestApplyOnSpawn`

Use this when a vehicle has just been spawned and you want the server to look up saved fitment.

```lua
TriggerServerEvent('zloma_stance:requestApplyOnSpawn', netId, plate)
```

If the server already has absolute fitment in the active cache, it sends that immediately. Otherwise it loads the saved database data and prepares it for the vehicle lifecycle.

***

## `zloma_stance:applyOnSpawn`

This is the client event that actually applies stance back onto the vehicle.

```lua
RegisterNetEvent('zloma_stance:applyOnSpawn', function(netId, data)
    -- apply data to vehicle
end)
```

Accepted data formats:

* Absolute normalized fitment values
* Database delta format with `stance` and `camber`

The client handles conversion when needed.

***

## Disabled Legacy Events

Older duplicate-sync events exist in comments inside the source but are not part of the active API anymore:

* `zloma_stance:updateActiveVehicle`
* `zloma_stance:setAbsoluteData`

The resource now relies on state bags for sync instead of those extra network broadcasts.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://zloma-scripts.gitbook.io/zloma-scripts/zloma_stance-free-escrow/api-reference/events.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.
