> 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_hud-free-escrow/api-reference/server-exports.md).

# Server Exports

## Stress

### `getStress`

Returns stress for a player source.

```lua
local stress = exports["zloma_hud"]:getStress(source)
```

### `setStress`

Sets stress for a player source and saves it when persistence is enabled.

```lua
exports["zloma_hud"]:setStress(source, 50)
```

### `addStress`

Adds stress for a player source.

```lua
exports["zloma_hud"]:addStress(source, 10)
```

### `relieveStress`

Removes stress from a player source.

```lua
exports["zloma_hud"]:relieveStress(source, 10)
```

### `saveStress`

Forces a stress save for a player source.

```lua
exports["zloma_hud"]:saveStress(source)
```

***

## Mileage

### `getMileageByEntity`

Returns mileage from an entity state bag.

```lua
local mileage = exports["zloma_hud"]:getMileageByEntity(vehicle)
```

### `getMileageByPlate`

Returns stored mileage by plate.

```lua
local mileage = exports["zloma_hud"]:getMileageByPlate("ABC123")
```

### `getMileageUnit`

Returns configured mileage unit.

```lua
local unit = exports["zloma_hud"]:getMileageUnit()
```

### `GetMileage`

Compatibility export returning mileage and unit.

```lua
local mileage, unit = exports["zloma_hud"]:GetMileage("ABC123")
```


---

# 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_hud-free-escrow/api-reference/server-exports.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.
