# README

> In-vehicle music player for FiveM — stream any audio URL directly from inside your car, synced to all passengers in real time.

## What is moh\_carplay?

**moh\_carplay** gives players an in-game CarPlay-style interface while sitting in a vehicle. Any player can open the UI, paste an audio URL, and start playing — every other passenger hears the same audio in perfect sync.

Song state (current track, timestamp, volume, pause status) is stored on the vehicle's statebag. This means music survives seat changes, short disconnects, and players joining mid-song — they automatically catch up to the correct position.

## At a glance

|                  |                               |
| ---------------- | ----------------------------- |
| **Framework**    | QBCore · ESX · Standalone     |
| **Sync**         | All passengers, real-time     |
| **State**        | Persisted on vehicle statebag |
| **Audio engine** | xsound                        |
| **OneSync**      | Required                      |

## Quick links

* Installation — get up and running in minutes
* Configuration — all `Config.*` options explained
* Events — server ↔ client event reference
* Troubleshooting — common issues and fixes


---

# 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-carplay/readme.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.
