# items

You must register the boombox item in your framework's item registry before players can use it.

{% hint style="info" %}
The item name must match `Config.BoomboxItem` in `config.lua` exactly. The default is `'boombox'`.
{% endhint %}

## Register the item

{% tabs %}
{% tab title="ESX" %}
Insert the item into your `items` table in the database:

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('boombox', 'Boombox', 1, 0, 1);
```

✅ The server script automatically registers the item as usable via `ESX.RegisterUsableItem` — you don't need to add anything extra to your server code.
{% endtab %}

{% tab title="QBCore" %}
Add the item to `qb-core/shared/items.lua`:

```lua
['boombox'] = { name = 'boombox', label = 'Boombox', weight = 1000, type = 'item', image = 'boombox.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'A portable boombox for playing music', },
```

⚠️ Add a `boombox.png` image to your inventory resource's images folder (e.g. `qb-inventory/html/images/`). Without it, the item will have a broken image in the inventory UI.

✅ The server script automatically registers the item as usable via `QBCore.Functions.CreateUseableItem`.
{% endtab %}
{% endtabs %}

## Giving the item to players

Use these admin commands to give the boombox item for testing:

{% tabs %}
{% tab title="ESX" %}

```bash
/giveitem [playerid] boombox 1
```

{% endtab %}

{% tab title="QBCore" %}

```bash
/giveitem [playerid] boombox 1
```

{% endtab %}
{% endtabs %}


---

# 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://mohssins.gitbook.io/mohscriptsdocs/moh-boombox/items.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.
