# 0R Carplay

## #Step 1

Download xSound from here and start on your server; <https://github.com/Xogy/xsound>

## #Step 2 Make your configurations in config.lua

## Step 3 Run the sql file from 0r-carcontrol.

## Step 4 open your server.cfg and ensure the resource. ensure 0r-carcontrol

## Note go to xsound/config and setting config.RefreshTime = 0

if Config.PlayMusicOnlyInVehicle this feature disabled go to xsound/client/exports/manipulation.lua and change Position function with this:

```lua
function Position(name, pos)
    if not IsPedInAnyVehicle(PlayerPedId()) then
        Wait(500)
    end
    SendNUIMessage({
        status = "soundPosition",
        name = name,
        x = pos.x,
        y = pos.y,
        z = pos.z,
    })
    soundInfo[name].position = pos
    soundInfo[name].id = name_
end
```

after that restart your server.


---

# 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://docs.0resmon.org/0resmon/0resmon-1/0r-resources/0r-carplay.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.
