# index

A feature-rich in-game boombox system for FiveM. Play YouTube audio in the world with 3D positional sound, a slick NUI control panel, per-player saved playlists, and full ESX & QBCore support.

## Features

* 🎵 **YouTube Playback**\
  Paste any YouTube URL and stream audio in-world via xsound with real-time title & thumbnail fetching.
* 🎛️ **NUI Control Panel**\
  Sleek purple-themed boombox UI with volume, distance sliders, play/stop, and saved songs.
* 💾 **Save Songs**\
  Players can save and reload their favourite URLs per-account from the database.
* 📡 **3D Positional Audio**\
  Distance-based sound that fades naturally. Adjustable radius up to 40 units.
* 🗺️ **Target Integration**\
  ox\_target, qtarget, and qb-target supported out of the box with auto-detection.
* 🔔 **Universal Notifications**\
  Auto-detects ox\_lib, okokNotify, mythic\_notify, ESX, QBCore, or falls back to chat.
* 📝 **Discord Logging**\
  Every song play is logged to your Discord channel via webhook with player name & URL.
* 🛡️ **Admin Command**\
  `/stopallboombox` halts all active boombox sounds server-wide instantly.
* ♻️ **Auto-Cleanup**\
  Sounds and zones are removed automatically when a boombox entity despawns.

## Requirements

| Dependency                                | Required | Notes                                                   |
| ----------------------------------------- | -------- | ------------------------------------------------------- |
| `xsound`                                  | Required | Audio engine — must be started before moh-boombox       |
| `oxmysql`                                 | Required | Database driver for saved songs                         |
| `es_extended` or `qb-core`                | Required | At least one supported framework must be present        |
| `ox_target` / `qtarget` / `qb-target`     | Optional | Target system for interact & pickup zones               |
| `ox_lib` / `okokNotify` / `mythic_notify` | Optional | Notification resource — falls back to framework or chat |

## Quick Links

* 📦 Installation — Get up and running in minutes
* ⚙️ Configuration — Every config option explained
* 🎛️ NUI Panel — How to use the boombox UI
* 🛠️ Troubleshooting — Fix common issues fast


---

# 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/index.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.
