---
description: Configuration guide of Bottle Spin
---

# Configuration

***

## <mark style="color:blue;">Configuration Guide for Bottle Spin Script</mark>

This guide will help you set up and customize the Bottle Spin script for your FiveM server. Follow the steps below to configure the settings according to your preferences.

### <mark style="color:blue;">Bottle Spin Script Configuration</mark>

#### <mark style="color:green;">1. Language Setting</mark>

Defines the language for the script. Supported languages are English (en), German (de), French (fr), Spanish (sp), and Polish (pl).

```lua
STG.Language = 'en' -- Options: 'en', 'de', 'fr', 'sp', 'pl'
```

#### <mark style="color:green;">2. Framework Selection</mark>

Specifies the framework to be used. It can automatically detect the available framework (ESX or QBCore).

```lua
STG.Framework = 'auto' -- Options: 'esx', 'qbcore', 'auto'
```

#### <mark style="color:green;">3. Bottle Model</mark>

Defines the model for the bottle used in the script.

```lua
STG.BottleModel = 'prop_wine_bot_01'
```

#### <mark style="color:green;">4. Marker Color</mark>

Sets the color for the marker in the script.

```lua
STG.MarkerColor = { r = 0, g = 169, b = 255 }
```

#### <mark style="color:green;">5. Movement Setting</mark>

Determines whether players can move while the bottle is spinning.

```lua
STG.canMoveWhileSpinning = false
```

#### <mark style="color:green;">6. Custom Notify</mark>

Custom notify event or function for messages.

```lua
STG.CustomNotify = function(message)
    TriggerEvent('esx:showNotification', message)
end
```

#### <mark style="color:green;">7. Cooldown Messages</mark>

Messages displayed during the cooldown period in different languages.

```lua
STG.CooldownMessages = {
    en = "THE BOTTLE IS SPINNING, YOU CAN PICK IT UP AFTER IT STOPS.",
    de = "DIE FLASCHE DREHT SICH, DU KANNST SIE ERST DANACH AUFHEBEN.",
    fr = "LA BOUTEILLE TOURNE, VOUS POUVEZ LA RAMASSER APRÈS QU'ELLE S'ARRÊTE.",
    sp = "LA BOTELLA ESTÁ GIRANDO, PUEDES RECOGERLA DESPUÉS DE QUE SE DETENGA.",
    pl = "BUTELKA SIĘ KRĘCI, MOŻESZ JĄ PODNIEŚĆ PO JEJ ZATRZYMANIU."
}
```

#### <mark style="color:green;">8. Framework Function</mark>

Determines the framework based on the configuration.

```lua
function getFramework()
    if STG.Framework == "esx" then
        return exports['es_extended']:getSharedObject(), "esx"
    elseif STG.Framework == "qb" then
        return exports["qb-core"]:GetCoreObject(), "qb"
    elseif STG.Framework == "auto" then
        if GetResourceState('qb-core') == 'started' then
            return exports["qb-core"]:GetCoreObject(), "qb"
        elseif GetResourceState('es_extended') == 'started' then
            return exports['es_extended']:getSharedObject(), "esx"
        end
    end
end
```

#### <mark style="color:green;">9. Cooldown Message Function</mark>

Gets the appropriate cooldown message based on the selected language.

```lua
STG.GetCooldownMessage = function()
    return STG.CooldownMessages[STG.Language] or STG.CooldownMessages['en']
end
```

#### <mark style="color:green;">10. Notify Messages</mark>

Defines notify messages for different actions in various languages.

```lua
const Config = {
    Language: 'en',

    NotifyMessages: {
        'en': {
            BottleAlreadySpun: "THE BOTTLE HAS ALREADY BEEN SPUN. PLEASE WAIT 10 SECONDS.",
            PickUpBottle: "PRESS 'G' TO PICK UP THE BOTTLE",
            SpinBottle: "PRESS 'E' TO SPIN THE BOTTLE"
        },
        'de': {
            BottleAlreadySpun: "DIE FLASCHE WURDE BEREITS GEDREHT. BITTE WARTE 10 SEKUNDEN.",
            PickUpBottle: "DRÜCKEN SIE 'G' UM DIE FLASCHE AUFZUHEBEN",
            SpinBottle: "DRÜCKEN SIE 'E' UM DIE FLASCHE ZU DREHEN"
        },
        'fr': {
            BottleAlreadySpun: "LA BOUTEILLE A DÉJÀ ÉTÉ TOURNÉE. VEUILLEZ ATTENDRE 10 SECONDES.",
            PickUpBottle: "APPUYEZ SUR 'G' POUR RAMASSER LA BOUTEILLE",
            SpinBottle: "APPUYEZ SUR 'E' POUR TOURNER LA BOUTEILLE"
        },
        'sp': {
            BottleAlreadySpun: "LA BOTELLA YA HA SIDO GIRADA. POR FAVOR, ESPERE 10 SEGUNDOS.",
            PickUpBottle: "PRESIONE 'G' PARA RECOGER LA BOTELLA",
            SpinBottle: "PRESIONE 'E' PARA GIRAR LA BOTELLA"
        },
        'pl': {
            BottleAlreadySpun: "BUTELKA JUŻ SIĘ KRĘCI. PROSZĘ POCZEKAĆ 10 SEKUND.",
            PickUpBottle: "NACIŚNIJ 'G', ABY PODNIEŚĆ BUTELKĘ",
            SpinBottle: "NACIŚNIJ 'E', ABY ZAKRĘCIĆ BUTELKĄ"
        }
    }
};
```

#### <mark style="color:green;">11. CSS Customization</mark>

Custom CSS for styling.

```css
:root {
    --text-stroke-color: rgba(144, 217, 255, 0.80);
    --text-gradient: linear-gradient(90deg, rgba(0, 0, 0, 0.80) 0%, rgba(0, 169, 255, 0.80) 49.13%, rgba(0, 0, 0, 0.80) 100%);
}
```

***
