> For the complete documentation index, see [llms.txt](https://docs.otherplanet.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherplanet.dev/scripts/op-mechanic-v2/tutorials/require-nitro-and-anti-lag-install-item.md).

# Require nitro & anti-lag install item

Sell nitro / anti-lag kits as inventory items (Tebex, coin shop, black market, mechanic parts order). Players must use the item on the vehicle before the tuning menu lets them mount the kit.

{% hint style="success" %}
**Tebex-friendly flow:** package delivers `nitrous_install_kit` / `antilag_install_kit` → player uses item near the car → mount unlocks in tuning → player still pays labour / opens a work order like any other mod.
{% endhint %}

{% hint style="info" %}
Using the item only **unlocks** install. It does **not** fit the kit by itself.
{% endhint %}

***

{% stepper %}
{% step %}
**Enable the lock in config**

**Nitro** - `config/NitroConfig.lua`

```lua
Config.Nitro = {
    -- ...
    requireInstallItem = true,          -- false = free mount from tuning (default)
    kitItem = 'nitrous_install_kit',    -- must match your inventory item name
    kitUnlockDurationMs = 4500,         -- progress bar; 0 = instant
    -- ...
}
```

**Anti-lag** - `config/AntiLagConfig.lua`

```lua
Config.AntiLag = {
    -- ...
    requireInstallItem = true,
    kitItem = 'antilag_install_kit',
    kitUnlockDurationMs = 4500,
    -- ...
}
```

Restart `op-mechanic` (or the server) after editing.
{% endstep %}

{% step %}
**Create the inventory items**

Add items if they are missing. See also [Create Items](https://docs.otherplanet.dev/scripts/op-mechanic-v2/create-items.md).

**ox\_inventory**

```lua
['nitrous_install_kit'] = {
    label = 'Nitrous Install Kit',
    weight = 1200,
    stack = true,
    close = true,
    description = 'Use on a vehicle to unlock nitro kit install in the tuning menu.',
    client = {
        export = 'op-mechanic.useNitroKitUnlock',
    },
},

['antilag_install_kit'] = {
    label = 'Anti-lag Install Kit',
    weight = 1000,
    stack = true,
    close = true,
    description = 'Use on a vehicle to unlock anti-lag install in the tuning menu.',
    client = {
        export = 'op-mechanic.useAntiLagKitUnlock',
    },
},
```

{% hint style="info" %}
When `requireInstallItem = true`, the resource also registers the items as framework usables (ESX / QB / Qbox). The ox `client.export` is the preferred path for ox\_inventory.
{% endhint %}

**qb-core / qbox (`qb-core/shared/items.lua`)**

```lua
nitrous_install_kit = {
    name = 'nitrous_install_kit',
    label = 'Nitrous Install Kit',
    weight = 1200,
    type = 'item',
    image = 'nitrous_install_kit.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = 'Use on a vehicle to unlock nitro kit install in the tuning menu.',
},
antilag_install_kit = {
    name = 'antilag_install_kit',
    label = 'Anti-lag Install Kit',
    weight = 1000,
    type = 'item',
    image = 'antilag_install_kit.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = 'Use on a vehicle to unlock anti-lag install in the tuning menu.',
},
```

**ESX (`items` SQL)**

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('nitrous_install_kit', 'Nitrous Install Kit', 1200, 0, 1),
('antilag_install_kit', 'Anti-lag Install Kit', 1000, 0, 1);
```

{% endstep %}

{% step %}
**Sell the items (Tebex / shops)**

Typical monetization:

| Channel                  | Idea                                                                                   |
| ------------------------ | -------------------------------------------------------------------------------------- |
| **Tebex**                | Package grants `nitrous_install_kit` / `antilag_install_kit` via your give-item bridge |
| **Coin / VIP shop**      | Same item names as above                                                               |
| **Mechanic parts order** | `nitrous_install_kit` and `antilag_install_kit` are in `Config.Parts.catalog`          |
| **Illegal craft**        | Craft → use on car → still need a mechanic (or self-service) to mount                  |

Bottles (`nitrous_bottle`) stay separate - they only refill an **already fitted** kit.
{% endstep %}

{% step %}
**Player flow in-game**

1. Stand near (or in) the vehicle.
2. **Use** `nitrous_install_kit` or `antilag_install_kit` from inventory.
3. Progress finishes → item is **consumed** → mount is **unlocked** on that vehicle.
4. Open the **tuning menu** at a shop.
5. Nitro kit / anti-lag style is no longer locked - add to cart, pay / work order as usual.

{% hint style="warning" %}
Uninstalling the kit from tuning **clears** the unlock. The player must use another kit item before mounting again.
{% endhint %}
{% endstep %}
{% endstepper %}

***

#### Disable again

Set both flags back to `false` if you want free mounting from the menu (stock behaviour):

```lua
Config.Nitro.requireInstallItem = false
Config.AntiLag.requireInstallItem = false
```

***

#### Related exports

```lua
-- ox_inventory / custom handlers
exports['op-mechanic']:useNitroKitUnlock()
exports['op-mechanic']:useAntiLagKitUnlock()
```

***

#### Troubleshooting

| Issue                                 | Fix                                                                                                     |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Option still locked after using item  | Confirm `requireInstallItem = true`, restart resource, stand closer to the vehicle, check notify errors |
| Item does nothing                     | ox: set `client.export`; QB/ESX: ensure usable registration + resource started                          |
| Item consumed but tuning still locked | Re-open the tuning session (or wait for mid-session lock sync);                                         |
| Want custom item names                | Change `kitItem` in config **and** inventory item name to match                                         |
