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

# Integrations

Provider selection: `shared/providers.lua` (`use` + `detect`).

Access the API:

```lua
local DEVIX = exports['devix-core']:getObjects()
```

For **Target** (and the same table in one load):

```lua
shared_scripts { '@devix-core/init.lua' }
```

Inventory and notify stay on the existing API (`AddItem`, `RemoveItem`, `Notify`). Extra helpers below.

***

## Server — Integrations

| File              | Description                                   |
| ----------------- | --------------------------------------------- |
| GiveVehicleKeys   | Give vehicle keys (`src`, vehicle, plate?).   |
| RemoveVehicleKeys | Remove vehicle keys (`src`, vehicle, plate?). |
| SetVehicleFuel    | Set fuel 0–100 (`src`, vehicle, amount).      |
| SocietyPay        | Add money to a society/job account.           |
| SocietyRemove     | Remove money from a society/job account.      |
| SocietyBalance    | Society account balance (number).             |

```lua
DEVIX.GiveVehicleKeys(src, vehicle, plate)
DEVIX.SetVehicleFuel(src, vehicle, 100.0)
DEVIX.SocietyPay('police', 500)
```

Raw exports (same behaviour): `BridgeGiveKeys`, `BridgeRemoveKeys`, `BridgeSetFuel`, `BridgeSocietyPay`, `BridgeSocietyRemove`, `BridgeSocietyBalance`.

***

## Client — Integrations

| File              | Description                                        |
| ----------------- | -------------------------------------------------- |
| GiveVehicleKeys   | Give keys (vehicle, plate?).                       |
| RemoveVehicleKeys | Remove keys (vehicle, plate?).                     |
| SetVehicleFuel    | Set fuel 0–100 (vehicle, amount).                  |
| Progress          | Blocking progress bar; returns `true` if finished. |
| ShowTextUI        | Show text UI / Devix prompt.                       |
| HideTextUI        | Hide text UI / prompt.                             |
| OpenStash         | Open a stash by id (provider-dependent).           |
| Target            | Target helpers (requires `@devix-core/init.lua`).  |

```lua
DEVIX.GiveVehicleKeys(vehicle, plate)
DEVIX.SetVehicleFuel(vehicle, 80.0)
DEVIX.Progress({ label = 'Working...', duration = 5000 })
DEVIX.ShowTextUI('Open', { key = 'E' })
DEVIX.HideTextUI()

DEVIX.Target.AddBoxZone('demo', coords, vec3(1, 1, 1), 0.0, {
    { name = 'demo', label = 'Use', onSelect = function() end },
})
```

Raw exports: `BridgeGiveKeys`, `BridgeSetFuel`, `BridgeProgress`, `BridgeShowTextUI`, `BridgeHideTextUI`, `BridgeOpenStash`.

### Target methods

| Method            | Description                                                |
| ----------------- | ---------------------------------------------------------- |
| AddBoxZone        | Box zone (`name`, coords, size, rotation, options, meta?). |
| AddSphereZone     | Sphere zone (`name`, coords, radius, options, meta?).      |
| AddLocalEntity    | Options on a local entity.                                 |
| RemoveZone        | Remove zone by id/name.                                    |
| RemoveLocalEntity | Remove entity options.                                     |

***

## Providers

Edit `shared/providers.lua`:

{% stepper %}
{% step %}

### Add the provider

Add the resource name to `Category.detect` (top = preferred), or set `use = "resource_name"`.
{% endstep %}

{% step %}

### Add the branch

Add the export/event branch in `integrations/<category>/server.lua` and/or `client.lua`.
{% endstep %}
{% endstepper %}

Categories: `Inventory`, `Notify`, `VehicleKeys`, `Fuel`, `Society`, `Target`, `Progress`, `TextUI`.

`Notify.use = "auto"` → framework `DEVIX.Notify`.\
`Society.use = "off"` → society helpers disabled.

NUI overlay docs: [DEVIX\_UI.md](broken://pages/7109d8e3203c27461a2a73a3dbc00ba74533b691).


---

# 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, and the optional `goal` query parameter:

```
GET https://devix.gitbook.io/devix/devix-core/integrations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
