# Nalajcie - Boombox

<figure><img src="https://194743144-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxD8AsSVoUaJmbQrk62o1%2Fuploads%2Feqx92oVAJGy4io0MGFuQ%2FBoombox.png?alt=media&#x26;token=ccea8be0-5700-4dbc-91fc-3e034f9b04bf" alt=""><figcaption></figcaption></figure>

The "nalajcie\_boombox" script is an advanced tool that allows players in the FiveM game to interact with a boombox. The script enables music playback, playlist management, volume control, and the ability to adjust the audible distance of the music. It integrates with the ESX framework and uses xsound for sound playback.

{% hint style="info" %}
**Resource must be named `nalajcie_boombox`to work properly.**
{% endhint %}

#### Features

1. **Boombox Placement and Interaction**:
   * Players can place a boombox in the game world, attach it to their character, and detach it when needed.
   * Interactions are managed through the `ox_target` resource, providing contextual options like playing music, picking up, or destroying the boombox.
2. **Music Management**:
   * Players can play, pause, resume, and stop music on the boombox using YouTube URLs.
   * The script supports volume adjustment, music playback distance configuration, and playlist management.
3. **Playlist Management**:
   * Players can add, rename, update, and delete songs in their personal playlist.
   * Playlists are stored server-side and persist across server restarts.
4. **Synchronization**:
   * Music playback is synchronized between all players in the vicinity of the boombox.
   * When players reconnect, ongoing music playback is restored.
5. **Animations**:
   * Various animations are used to enhance the realism of placing, picking up, and holding the boombox.

{% embed url="<https://youtu.be/dSMvEHO47Ts>" %}


---

# 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://nalajcie-store.gitbook.io/nalajcie-scripts/paid-scripts/quickstart.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.
