> For the complete documentation index, see [llms.txt](https://acestudios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acestudios.gitbook.io/docs/roleplay/live-radio/boombox-and-dj-deck.md).

# Boombox & DJ Deck

Placeable audio sources — from a personal boombox to a full party DJ deck.

## Boombox

```lua
Config.Boombox = { Enabled = true, Item = false, MaxPerPlayer = 2, AnyoneCanTune = false }
```

Lets players place a boombox with `/boombox`, or — when `Config.Boombox.Item` is set — only by using that item (the command is off then).

### Placing

Placing shows a see-through preview where the camera points: on the ground, a table, a counter, or any other flat-enough surface.

| Control                             | Action             |
| ----------------------------------- | ------------------ |
| Scroll wheel, or ← →                | Rotate the preview |
| <kbd>E</kbd>                        | Place it           |
| <kbd>Backspace</kbd> or right-click | Cancel             |

The preview turns **red** when the spot is too far (`PlaceDistance`), too steep (`MaxSlope`), behind a wall, or on a vehicle or person. The server checks the distance and height again.

### Using it

Standing next to a boombox:

| Control      | Who                                               | Action                            |
| ------------ | ------------------------------------------------- | --------------------------------- |
| <kbd>E</kbd> | Anyone                                            | Opens the station list to tune it |
| <kbd>H</kbd> | Owner                                             | Moves it                          |
| <kbd>G</kbd> | Owner, or admins with `Config.AdminAcePermission` | Picks it up                       |

Everyone within `HearingDistance` (default `35.0` m) hears the station's music from it. The volume slider in the boombox's station list (marked *Everyone*) sets its volume for everyone nearby; whoever can tune it can change it.

With `ox_target` or `qb-target` running, the boombox gets **Tune**, **Move** and **Pick up** target options. Otherwise players see an `[E] Tune [H] Move [G] Pick up` prompt in your text UI (`Config.TextUI`).

### Nearby music sources

Players in range of a boombox see a small "Boombox nearby" card next to the mini player. The station list key (`Q`) then opens **Nearby music sources**, where they can mute any boombox for themselves only.

{% hint style="info" %}
When `Q` opens a station list instead (driving, front passenger, or wearing headphones), the card doesn't show the `Q` hint — the station list gets a **Music sources** button that switches to the nearby-sources panel instead, so both stay reachable.
{% endhint %}

The panel's footer moves the card to any corner and switches it to a compact size; each player's choice is remembered.

{% hint style="warning" %}
Live Voice and Podcast audio isn't played through boomboxes, so those stations are greyed out in a boombox's station list.
{% endhint %}

A player's boomboxes are removed when they disconnect or the resource restarts. The item itself isn't used up — see [Commands, Exports & Items](/docs/roleplay/live-radio/commands-and-exports.md#items) for the generated ox\_inventory entry.

## DJ deck

```lua
Config.DJDeck = { Enabled = true, Item = false, MaxPerPlayer = 1, AnyoneCanTune = false, CertifiedOnly = false }
```

A DJ deck (`prop_dj_deck_02`) for parties. It works like a boombox — place with `/djdeck` or its item, move with <kbd>H</kbd>, pick up with <kbd>G</kbd>, mute it from *Nearby music sources* — but it's heard much further away (`HearingDistance = 100.0` vs. the boombox's `35.0`) and at full volume.

### Speakers

A new deck needs its speaker (`SpeakerModel = 'prop_speaker_01'`) first:

1. At the deck, the owner's first prompt is **E Place speaker**, which shows the same placement preview as a boombox.
2. The speaker has to stay within `SpeakerDistance` (default `15` m) of the deck.
3. With a speaker down, <kbd>Y</kbd> at the deck adds another, up to `MaxSpeakers` (default `2`).

Each player hears **one synced stream** from the speaker nearest to them, so speakers never play out of step with each other. Speakers can be moved (<kbd>H</kbd>) or picked up (<kbd>G</kbd>); the deck keeps playing while it has at least one speaker, goes silent without any, and picking up the deck takes its speakers with it.

### Playing music

Once a speaker is down, <kbd>E</kbd> at the deck opens the station list. The DJ can:

* tune the deck to any music station, or
* press **Play my station** to play the station they host (**Go on air** opens the host console first if they aren't hosting yet).

Their music queue then plays through the deck for the whole party.

{% hint style="warning" %}
Live Voice and Podcast audio isn't played through decks, same as the boombox.
{% endhint %}

If the crowd drifts out of step, **Sync speakers** in the deck's station list moves everyone listening to whoever is furthest into the song (for example, `00:50` and `01:20` both become `01:20`).

### Who can use one

```lua
Config.DJDeck = { Enabled = true, Item = false, MaxPerPlayer = 1, AnyoneCanTune = false, CertifiedOnly = true }
Config.CertifiedDJs = {
    ['license:xxxx'] = true,
}
Config.DJJobs = {
    ['vanilla'] = 0, -- lowest grade
}
```

| `CertifiedOnly` | Behavior                                                                                                                                                                                                                                                                                                                        |
| :-------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|      `true`     | Only players in `Config.CertifiedDJs` (by identifier) or with a job in `Config.DJJobs` can place and use DJ decks. Their stations show a **Certified DJ** badge next to their name everywhere: the station list, the mini player, and on their deck in *Nearby music sources*. The startup summary warns when nobody is listed. |
|     `false`     | Everyone can use DJ decks and nobody gets a badge.                                                                                                                                                                                                                                                                              |

`AnyoneCanTune = true` lets other allowed players tune your deck too. Placing speakers, moving, picking up and **Sync speakers** always stay with the DJ who placed it.

For ox\_inventory, the item uses `server = { export = 'ace_liveradio.useDJDeck' }` — see [Commands, Exports & Items](/docs/roleplay/live-radio/commands-and-exports.md#items).
