> For the complete documentation index, see [llms.txt](https://arrayscripts.gitbook.io/arrayscripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://arrayscripts.gitbook.io/arrayscripts/products/array_carrent/configuration.md).

# Configuration

{% hint style="danger" %} <mark style="color:$danger;">**Important:**</mark> After making changes to the configuration, restart the resource using:

`ensure array_carrent`
{% endhint %}

## Config Files

{% tabs %}
{% tab title="config.lua" %}
{% code lineNumbers="true" expandable="true" %}

```lua
Array = {}

Array.Framework = "auto" -- auto, esx, qbcore or custom

Array.ServerName = "ARRAY SCRIPTS" -- Your Server Name

Array.MainSettings = {
    VehiclePlate = "Array",
    MinimumRentalTime = 1, -- in minutes
    MaximumRentalTime = 99, -- in minutes
    PayType = "bank",
    ServerSideSpawn = true
}

Array.VehicleColors = {
    ["1"] = {r = 255, g = 255, b = 255},
    ["2"] = {r = 0, g = 0, b = 0},
    ["3"] = {r = 255, g = 0, b = 0},
    ["4"] = {r = 136, g = 0, b = 255},
    ["5"] = {r = 0, g = 0, b = 255},
    ["6"] = {r = 0, g = 255, b = 0},
    ["7"] = {r = 255, g = 208, b = 0},
    ["8"] = {r = 0, g = 229, b = 255}
}

Array.TimerUi = {
    x = {
        side = "left", -- "left" oder "right"
        percent = 50 -- in %
    },
    y = {
        side = "bottom", -- "top" oder "bottom"
        percent = 2 -- in %
    }
}

Array.Positions = {
    ["Airport"] = {
        OpenCoords = vector3(-1032.8925, -2736.3328, 20.1693),
        SpawnCoords = {
            vector4(-1022.4916, -2734.1125, 20.1719, 245.9023),
            vector4(-1004.4996, -2738.1951, 20.1793, 256.7206)
        },
        Blip = {enabled = true, Sprite = 326, Color = 50, Name = "Car Rental", Scale = 0.8},
        Marker = {DrawDistance = 15.0, Scale = vector3(1.0, 1.0, 1.0), Type = 21, Color = {r = 136, g = 0, b = 255, a = 100}, MoveUpAndDown = false, Rotate = true},
        Vehicles = {
            {
                name = "jugular", -- vehicle spawn name
                label = "Jugular",
                typelabel = "Car", --It's just for the UI, so you can write whatever you want there.
                price = 650,
            },
            {
                name = "bf400", -- vehicle spawn name
                label = "Bf400",
                typelabel = "Car", --It's just for the UI, so you can write whatever you want there.
                price = 450,
            },
            {
                name = "club", -- vehicle spawn name
                label = "Club",
                typelabel = "Car", --It's just for the UI, so you can write whatever you want there.
                price = 100,
            },
        }
    },
    ["Boat Rental"] = {
        OpenCoords = vector3(-779.7039, -1487.0033, 2.5979),
        SpawnCoords = {
            vector4(-823.2276, -1518.1575, -0.6325, 130.4084),
        },
        Blip = {enabled = true, Sprite = 410, Color = 50, Name = "Boat Rental", Scale = 0.8},
        Marker = {DrawDistance = 15.0, Scale = vector3(1.0, 1.0, 1.0), Type = 21, Color = {r = 136, g = 0, b = 255, a = 100}, MoveUpAndDown = false, Rotate = true},
        Vehicles = {
            {
                name = "jetmax", -- vehicle spawn name
                label = "Jetmax",
                typelabel = "Boat", --It's just for the UI, so you can write whatever you want there.
                price = 800,
            },
            {
                name = "seashark", -- vehicle spawn name
                label = "Seashark",
                typelabel = "Boat", --It's just for the UI, so you can write whatever you want there.
                price = 400,
            },
            {
                name = "tropic", -- vehicle spawn name
                label = "Tropic",
                typelabel = "Boat", --It's just for the UI, so you can write whatever you want there.
                price = 900,
            },
        }
    }
    -- Here You can add more
}

-- Here you can select your language. If it is not yet available, you can either add it yourself or open a ticket on our Discord.
Array.Locale = "en" -- de or en
Array.Locales = {
    ["de"] = {
        -- Ui
        title = "Vermietung",
        selectcolor = "Farbe Auswählen",
        timeinputtext = "Mietzeit Angeben",
        timeinput = "Zeit",
        selectcar = "Auswählen",
        perminute = "Pro Minute",
        time = "Zeit",
        rent = "Mieten",

        -- Notify and Prints
        help_notify = "Drücke E um die Auto Vermietung zu öffnen!",
        notenoughmoney_notify = "Du hast nicht genug Geld!",
        currentlyhaveanactiverental_notify = "Du hast derzeit eine aktive Automiete. Eine neue Anmietung ist erst möglich, sobald deine aktuelle Miete abgelaufen ist.",
        spawncooldown_notify = "Spawn Cooldown ist aktiv.",
        maxandmintime_notify = "Gib eine Mietzeit zwischen %s und %s Minuten an!",
        expiredrental_notify = "Die Miete dieses Autos ist abgelaufen und das Auto wird jetzt entfernt!",

        -- Webhook
        successfullyrented_webhook = "Der Spieler **%s** (ID: **%s**) hat sich bei der **%s** Vermietung erfolgreich das Fahrzeug **%s** mit der Farbe **%s** gemietet."
    },
    ["en"] = {
        -- Ui
        title = "Rental",
        selectcolor = "Select Color",
        timeinputtext = "Enter Rental Time",
        timeinput = "Time",
        selectcar = "Select",
        perminute = "Per Minute",
        time = "Time",
        rent = "Rent",

        -- Notify and Prints
        help_notify = "Press E to open the car rental!",
        notenoughmoney_notify = "You don't have enough money!",
        currentlyhaveanactiverental_notify = "You currently have an active rental. A new rental is only possible once your current rental has expired.",
        spawncooldown_notify = "Spawn cooldown is active.",
        maxandmintime_notify = "Enter a rental time between %s and %s minutes!",
        expiredrental_notify = "The rental period for this vehicle has expired and the vehicle will now be removed!",

        -- Webhook
        successfullyrented_webhook = "Player **%s** (ID: **%s**) successfully rented the vehicle **%s** with the color **%s** at the **%s** rental."
    },
}

Array.HelpNotify = function(key, text)
    if GetResourceState('array_hud') == 'started' then
        exports["array_hud"]:HelpNotify(key, text)
        return
    end

    SetTextComponentFormat('STRING')
    AddTextComponentString(text)
    DisplayHelpTextFromStringLabel(0, 0, 1, -1)

    -- Or your Custom Help Notify:
    -- exports["hud"]:HelpNotify(key, text)
end

Array.ClientNotify = function(title, message, type)
    TriggerEvent("array_hud:notify", title, message, type, 5000)
end

Array.ServerNotify = function(id, title, message, type)
    TriggerClientEvent("array_hud:notify", id, title, message, type, 5000)
end
```

{% endcode %}
{% endtab %}

{% tab title="s\_config.lua" %}
{% code lineNumbers="true" expandable="true" %}

```lua
ArrayServer = {}

ArrayServer.Webhook = {
    enabled = true,
    Name = "Array Scripts Carrent",
    Logo = "https://arrayscripts.com/images/Logo.gif",
    Url = "YOUR_WEBHOOK",
    Color = 10181046
}
```

{% endcode %}
{% endtab %}

{% tab title="color\_config.css" %}
{% code lineNumbers="true" expandable="true" %}

```css
:root {
  --main_color: #893AE6;
  --main_background: #0B0414;
  --title_div_color_2: #551D99;
  --button_color_2: #1c0f2b;
  --icondiv_color_2: #4C2080;
  --timetext_shadow: rgba(148, 60, 255, 0.45);
}

```

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

## CSS Themes

{% tabs %}
{% tab title="red.css" %}
{% code lineNumbers="true" expandable="true" %}

```css
:root {
  --main_color: #E63946;
  --main_background: #140404;
  --title_div_color_2: #991D28;
  --button_color_2: #2B0F12;
  --icondiv_color_2: #80202A;
  --timetext_shadow: rgba(230, 57, 70, 0.45);
}
```

{% endcode %}
{% endtab %}

{% tab title="blue.css" %}
{% code lineNumbers="true" expandable="true" %}

```css
:root {
  --main_color: #3A86FF;
  --main_background: #041014;
  --title_div_color_2: #1D4F99;
  --button_color_2: #0F1B2B;
  --icondiv_color_2: #204F80;
  --timetext_shadow: rgba(58, 134, 255, 0.45);
}
```

{% endcode %}
{% endtab %}

{% tab title="yellow\.css" %}
{% code lineNumbers="true" expandable="true" %}

```css
:root {
  --main_color: #FFD60A;
  --main_background: #141204;
  --title_div_color_2: #99801D;
  --button_color_2: #2B270F;
  --icondiv_color_2: #807020;
  --timetext_shadow: rgba(255, 214, 10, 0.45);
}
```

{% endcode %}
{% endtab %}

{% tab title="green.css" %}
{% code lineNumbers="true" expandable="true" %}

```css
:root {
  --main_color: #2ECC71;
  --main_background: #04140A;
  --title_div_color_2: #1D9950;
  --button_color_2: #0F2B18;
  --icondiv_color_2: #20804A;
  --timetext_shadow: rgba(46, 204, 113, 0.45);
}
```

{% endcode %}
{% endtab %}

{% tab title="orange.css" %}
{% code lineNumbers="true" expandable="true" %}

```css
:root {
  --main_color: #FF8C42;
  --main_background: #140A04;
  --title_div_color_2: #99521D;
  --button_color_2: #2B170F;
  --icondiv_color_2: #804420;
  --timetext_shadow: rgba(255, 140, 66, 0.45);
}
```

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