# SLEEK VEHICLE CONTROL + CAR RADIO

{% embed url="<https://youtu.be/3o8TmPvO2GE?si=T0sRvOZ5JSOSQALv>" %}

{% hint style="success" %}
This script is compatible with all **FRAMEWORKS.**
{% endhint %}

{% hint style="danger" %}
You can use any weather and time management script, but we recommend the most up-to-date <mark style="color:green;">CD\_EASYTIME</mark> one, which is also free, that you can download here: \
\
<https://github.com/dsheedes/cd_easytime>
{% endhint %}

**INSTALLATION GUIDE**

Download **forge-carmenu.pack.zip** from **KEYMASTER**, unzip it, and place the folder inside your server's **resources** directory.

#### **Installation Steps:**

1. Add the resources to your server's startup configuration **in the correct order**:

   ```lua
   ensure xsound
   ensure forge-carmenu
   ```

   &#x20;*<mark style="background-color:yellow;">**⚠ Do not rename the folder script**</mark><mark style="background-color:yellow;">, or the resource will not function correctly. It should be placed right below your core resources.</mark>*&#x20;
2. **Remove any other Vehicle Control script** you have in your resources folder to prevent conflicts.
3. **Clear the cache** of both your server and your FiveM client.
4. **Restart the entire server**, ensuring that **xSound** is started **before** forge-carmenu in your `server.cfg`.

#### **Important: xSound is Required for the Radio System**

To use the in-game carradio, you must install the **xSound script** and ensure it is running **before** forge-carmenu:\
🔗 [**Download xSound**](https://github.com/Xogy/xsound/releases)

Make sure xSound is properly installed and running before launching forge-carmenu to enable full radio functionality.

**CONFIG**

The following will explain all the settings, one of the most important things that I recommend you spend a few minutes to understand in order to offer your users the best possible experience.

{% tabs %}
{% tab title="CONFIG" %}
{% code lineNumbers="true" %}

```lua
Config = { }

--  ██████╗ ██████╗ ███╗   ██╗███████╗██╗ ██████╗ ██╗   ██╗██████╗  █████╗ ████████╗██╗ ██████╗ ███╗   ██╗
-- ██╔════╝██╔═══██╗████╗  ██║██╔════╝██║██╔════╝ ██║   ██║██╔══██╗██╔══██╗╚══██╔══╝██║██╔═══██╗████╗  ██║
-- ██║     ██║   ██║██╔██╗ ██║█████╗  ██║██║  ███╗██║   ██║██████╔╝███████║   ██║   ██║██║   ██║██╔██╗ ██║
-- ██║     ██║   ██║██║╚██╗██║██╔══╝  ██║██║   ██║██║   ██║██╔══██╗██╔══██║   ██║   ██║██║   ██║██║╚██╗██║
-- ╚██████╗╚██████╔╝██║ ╚████║██║     ██║╚██████╔╝╚██████╔╝██║  ██║██║  ██║   ██║   ██║╚██████╔╝██║ ╚████║
--  ╚═════╝ ╚═════╝ ╚═╝  ╚═══╝╚═╝     ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝   ╚═╝   ╚═╝ ╚═════╝ ╚═╝  ╚═══╝

-- GENERAL:
Config.Debug = false -- If true, debug messages will be printed to the console to help troubleshoot issues
Config.Command = 'vehiclecontrol' -- Here put the command you want that can open the menu
Config.Key = 'F7' -- The key you want that opens the menu
Config.UseCheckWeather = true -- If you don't want to use any weather system like cd_easytime, then set this to false here, and the weather symbol will always remain the same without checking the weather condition
Config.EnableRadio = true -- If false, the radio button and all radio functionality will be disabled
Config.ContinueRadioOnExit = true -- If true, the radio will continue playing when player exits the vehicle

-- INTERFACE

Config.UISettings = { -- All the options to modify the UI, such as translations or colors
    SoundVolume = 20,
    Colors = {
        Primary = '#00c5ff',
        PrimarySecond = '#31afd4',
        EngineSecondary = '#254092'
    },
    Translation = {
        Title = 'Vehicle control',
        Seat = 'Seat',
        Lock = 'Lock',
        Lights = 'Lights',
        Engine = 'Engine',
        Start = 'Start',
        Stop = 'Stop',
        Emergency = 'Emergency',
        NoLocation = 'No location selected',
        Left = 'Left',
        Right = 'Right',
        Front = 'Front',
        Back = 'Back',
        Radio = 'Radio',
        RadioTitle = 'Vehicle Radio',
        NowPlaying = 'Now playing:',
        NoMusic = 'No music',
        Volume = 'Vol:',
        Play = 'Play',
        Pause = 'Pause',
        EnterURL = 'Enter music URL (YouTube, MP3, etc.)',
        LoadMusic = 'Play',
        Favorites = 'Favorites',
        AddFavorite = 'Add to favorites',
        SaveFavorite = 'Save',
        Cancel = 'Cancel',
        EnterFavoriteName = 'Enter a name for this station',
        Delete = 'Delete',
        Edit = 'Edit',
        Loading = 'Loading...',
        LoadingYouTube = 'Loading YouTube music...',
        LoadingMP3 = 'Loading MP3...',
        YouTubeMusic = 'YouTube Music',
        MP3Music = 'MP3 Music',
        MusicPlaying = 'Music Playing'
    }
}

-- FUNCTIONS

Config.CustomFuel = false -- If you use a fuel system that does not use the native one and uses another function, put true here and you will also need to put down in Config.CustomFuelFunction the function that it is
Config.CustomEngine = false -- If you use a Engine system that does not use the native one and uses another function, put true here and you will also need to put down in CustomEngineFunction the function that it is
Config.CustomLock = false -- If you use a Carlock system that uses another function, put true here and you will also need to put down in CustomLockFunction the function that it is
Config.CustomLights = false -- If you use a Light system that uses another function, put true here and you will also need to put down in CustomLightsFunction the function that it is

Config.CustomFuelFunction = function(vehicle)

end

Config.CustomEngineFunction = function(vehicle)

end

Config.CustomLockFunction = function(vehicle)

end

Config.CustomLightsFunction = function(vehicle)

end

Config.GetWeather = function() -- Here you should put the function of your Time system. I suggest using the most updated and optimized CD_EASYTIME. It's free https://github.com/dsheedes/cd_easytime
    return exports['cd_easytime']:GetWeather().weather
end
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="success" %}
**If you want to edit the aesthetics or design. You have the HTML open so you can modify the style and everything as you want.**

The script is **RESPONSIVE** for all resolutions as well.
{% endhint %}


---

# 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://codeforge.gitbook.io/codeforge/sleek-series/sleek-vehicle-control-+-car-radio.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.
