# 8 · Integrations & Ecosystem

Verified integration patterns, Nord CarPlay setup and the open recommended-scripts catalog.

# Nord Inventory + Nord CarPlay

# Objective

This integration uses the Nord Inventory `carplay` item to start the Nord CarPlay vehicle-installation flow without consuming the item before the installation is actually accepted.

# Correct architecture

CarPlay begins as a **client-side action** because the player must be checked in the current vehicle/driver context and shown the installation progress. The final install is then validated by the CarPlay server.

For this flow, do **not** configure the item to start from a server-side `UseCarplay` export.

# Admin Studio configuration

Open the `carplay` item and use:

```text
Usable: On
Handler: External export
Resource name: nord_carplay
Export name: carplay
Execution side: Client
Remove on use: Off
```

The item should not be consumed on the first click.

# Item definition

```lua
['carplay'] = {
 label = 'CarPlay',
 weight = 750,
 stack = false,
 close = true,
 useable = true,
 image = 'carplay.png',

 client = {
 export = 'carplay',
 remove = 0
 }
}
```

# Nord CarPlay client export

```lua
exports('carplay', function(item, slot)
 TriggerEvent('nord_carplay:startCarplayInstall')
 return true
end)
```

Returning `true` explicitly is recommended. Nord treats an explicit `false` as a rejection and cancels the item use.

# Installation flow

1. Player selects **Use** on `carplay`.
2. Nord validates the current item/slot and creates a pending use token.
3. Nord calls `nord_carplay:carplay` on the client.
4. CarPlay starts `nord_carplay:startCarplayInstall`.
5. Client validates vehicle/driver context and runs the progress action.
6. CarPlay requests the server-side installation (`nord_carplay:installVehicleCarplay` in the documented flow).
7. CarPlay server validates the installation and removes the item only when the install succeeds.

Because Nord uses `remove = 0`, there is no double-removal or early consumption.

# Runtime handler registration

If `carplay` already exists as a database-authoritative Nord item, `RegisterItem` may correctly return `database_authoritative`. The CarPlay resource can still register the handler:

```lua
exports['nord_inventory']:RegisterUseExport(
 'carplay',
 'carplay',
 'client'
)
```

The bare export name is automatically bound to the calling resource (`nord_carplay`).

Explicit form:

```lua
exports['nord_inventory']:RegisterUseExport(
 'carplay',
 'nord_carplay',
 'carplay',
 'client'
)
```

# Why the old server handler fails

Problem configuration:

```lua
server = {
 export = 'UseCarplay',
 remove = 0
}
```

or Admin Studio:

```text
Resource name: nord_carplay
Export name: UseCarplay
Execution side: Server
```

This asks Nord to execute a server handler as the item-use action. That is the wrong entry point for a flow that needs current client vehicle/driver/progress behavior first.

If that export returns `false`, Nord shows:

```text
External export nord_carplay:UseCarplay rejected the item use.
```

# `Invalid inventory request.`

If this appears during CarPlay use:

1. verify the item still uses `carplay` on **Client**;
2. verify Nord Inventory is a complete current build, not a partial/mixed update;
3. verify `nord_carplay` starts after `nord_inventory`;
4. restart both resources after changing the item handler;
5. inspect the first server/client console error.

# Item image

The active Nord Inventory image must resolve as:

```lua
image = 'carplay.png'
```

and the installed file should exist in Nord Inventory's item image directory:

```text
nord_inventory/web/images/items/carplay.png
```

If Nord CarPlay ships an installer payload such as:

```text
nord_carplay/install/nord_inventory/carplay.png
```

that file must be copied/installed into the Nord Inventory image directory before runtime display.

# Restart order

```text
restart nord_inventory
restart nord_carplay
```

On full server startup:

```cfg
ensure nord_inventory
ensure nord_carplay
```

# Checklist

- [ ] `carplay` item exists and is enabled.
- [ ] Image name is exactly `carplay.png`.
- [ ] Handler is **External export**.
- [ ] Resource is `nord_carplay`.
- [ ] Export is `carplay`.
- [ ] Execution side is **Client**.
- [ ] Nord removal is disabled (`remove = 0`).
- [ ] Client export starts the installation event.
- [ ] Client export does not explicitly return `false` on accepted use.
- [ ] CarPlay server owns final validation and final item removal.
- [ ] Nord Inventory starts before Nord CarPlay.


# Recommended Scripts · Open Catalog

# Recommended Scripts

> This page is intentionally kept as an **open catalog** for verified Nord Inventory integrations.

Only scripts that have been tested with the current Nord Inventory API should be added here. Avoid listing a script as compatible only because it uses generic OX/QB-style inventory calls.

## Official / verified integrations

_Add verified scripts here as they are tested._

| Script | Developer | Integration type | Status | Notes |
|---|---|---|---|---|
| _Example_ | _Developer_ | Native / Bridge / External Use | Verified | _Short note_ |

## Suggested verification checklist

Before adding a script to this page, confirm:

- item registration does not overwrite DB-authoritative definitions;
- runtime items re-register correctly after resource restart;
- `RegisterUsableItem` / `RegisterUseExport` behavior works;
- client/server execution side is correct;
- failed external use does not consume the item;
- inventory mutations happen through server exports;
- metadata survives add/remove/move/restart flows;
- private stashes perform server-side permission checks;
- script works after `restart nord_inventory` and after full server restart.

## Submission template

```text
Script name:
Developer:
Website/Discord:
Integration type:
Frameworks tested:
Features tested:
Known limitations:
Last verification date:
```

## Status labels

Use one of these statuses:

- **Verified** — tested by Nord Lab with the current Nord Inventory API.
- **Developer Verified** — integration confirmed by the script developer.
- **Community Tested** — working reports exist but Nord Lab has not fully verified it.
- **Needs Retest** — compatibility should be validated again after relevant changes to Nord Inventory or the external script.

This page should stay factual. If an integration has not been tested, leave it unlisted until verification is complete.