# Create the SCBA Item for QBCore

This guide explains how to create and configure the **SCBA item** for **QBCore**, using **r\_scba** with a usable item registered in `server/sv_utils.lua`.

***

### 1. Enable QBCore support in `r_scba/config.lua`

Open:

```
r_scba/config.lua
```

Enable QBCore:

```lua
Config.QB = {
    enabled = true
}
```

Make sure **ESX is disabled** if you’re not using it:

```lua
Config.ESX = {
    enabled = false
}
```

***

### 2. Set the SCBA ItemName in the config

In your SCBA EUP entry inside `Config.EUP`, set the item name:

```lua
ItemName = 'scba'
```

This **must match** the item name you will define in your QBCore inventory.

***

### 3. Create the SCBA item in QBCore inventory

#### If you use **qb-inventory**

Open:

```
qb-inventory/shared/items.lua
```

Add:

```lua
scba = {
    name = 'scba',
    label = 'MSA G1 SCBA',
    weight = 10000,
    type = 'item',
    image = 'scba.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'Self-contained breathing apparatus.',
},
```

#### Field meaning (quick)

* **name**: internal item id (must be `scba`)
* **label**: display name
* **weight**: item weight
* **image**: icon file name
* **unique = true**: prevents stacking (recommended)
* **useable = true**: allows using the item

> If your inventory structure is slightly different, keep the same idea: item name **must equal** `ItemName`.

***

### 4. Add the SCBA icon (image)

Most QBCore inventories load images from:

```
qb-inventory/html/images/
```

You already have the icon here:

```
r_scba/scba.png
```

Copy it to:

```
qb-inventory/html/images/scba.png
```

The image filename must match the `image = 'scba.png'` value.

***

### 5. Restart and test

1. Restart the server (or restart affected resources)
2. Give yourself the item (`scba`)
3. Use it in your inventory


---

# Agent Instructions: 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://docs.rytrak.fr/scripts/firefighter-scba-system/create-the-scba-item-for-qbcore.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.
