> 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_namechange/configuration.md).

# Configuration

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

`ensure array_namechange`
{% 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.Price = 2000 -- How much should the user pay?

Array.Cooldown = {
    enabled = true, -- It consumes slightly more performance, as it needs to store the data in the database and also read it back out when spawning.
    type = "days", -- minutes, hours, days
    time = 14 -- How many minutes, hours, or days should the cooldown last?
}

Array.Positions = { -- Namechange Positions
    vector3(-544.9283, -204.2339, 38.2151)
}

Array.Marker = { -- Marker Settings
    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,
}

Array.Blip = { -- Blip Settings (https://docs.fivem.net/docs/game-references/blips/)
    enabled = true,
    Sprite = 793,
    Color = 50,
    Scale = 0.8
}

-- 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 = "Namensänderung",
        blip_name = "Namensänderung",
        firstname = "Vorname",
        lastname = "Nachname",
        cash = "Bar",
        bank = "Bank",
        changename = "Name ändern",

        -- Cooldown Button
        cooldown_prefix = "Cooldown verbleibend: ",
        days = "Tage",
        hours = "Stunden",
        minutes = "Minuten",
        less_than_minute = "weniger als 1 Minute",

        -- Notify and Prints
        help_notify = "Drücke E um die Namensänderung zu öffnen!",
        cooldown_activ = "Du kannst aufgrund eines Cooldowns deinen Namen noch nicht ändern!",
        changename_notify = "Du hast deinen Namen erfolgreich auf %s %s geändert",
        notenoughmoney_notify = "Du hast nicht genug Geld!",
        removeplayercooldown_notify = "Der Cooldown wurde erfolgreich entfernt.",
        playernotonline_notify = "Der angegebene Spieler ist nicht Online!",
        allremoved_notify = "Alle Cooldowns wurden entfernt!",
        nopermissions_notify = "Du hast keine Rechte für den Command!",
        blacklistname_notify = "Der angegebene Name enthält unzulässige Zeichen oder einen gesperrten Begriff.",
        minormaxerror_notify = "Der Name muss zwischen %s und %s Zeichen lang sein.",
        nosymbolsornumbers_notify = "Der Name darf nur Bustaben enthalten keine Sonderzeichen oder Zahlen!",

        -- Webhook
        changename_webhook = "Der Spieler hat seinen Namen zu %s %s geändert",
        removeplayercooldown_webhook = "Der Admin %s (ID: %s) hat den Namechange Cooldown von %s (Id: %s) entfernt!",
        allremoved_webhook = "Der Admin %s (ID: %s) hat alle Namechange Cooldowns gecleart!",
    },

    ["en"] = {
        -- Ui
        title = "Namechange",
        blip_name = "Namechange",
        firstname = "Firstname",
        lastname = "Lastname",
        cash = "Cash",
        bank = "Bank",
        changename = "Change Name",

        -- Cooldown Button
        cooldown_prefix = "Cooldown remaining: ",
        days = "Days",
        hours = "Hours",
        minutes = "Minutes",
        less_than_minute = "less than 1 minute",

        -- Notify and Prints
        help_notify = "Press E to open the Namechange!",
        cooldown_activ = "You cannot change your name yet because of a cooldown!",
        changename_notify = "You successfully changed your name to %s %s",
        notenoughmoney_notify = "You don't have enough money!",
        removeplayercooldown_notify = "The cooldown was removed successfully.",
        playernotonline_notify = "The player is not online!",
        allremoved_notify = "All cooldowns have been removed!",
        nopermissions_notify = "You don't have permission to use this command!",
        blacklistname_notify = "The specified name contains invalid characters or a blocked term.",
        minormaxerror_notify = "The name must be between %s and %s characters long.",
        nosymbolsornumbers_notify = "The name may only contain letters, no special characters or numbers!",

        -- Webhook
        changename_webhook = "The player changed their name to %s %s",
        removeplayercooldown_webhook = "Admin %s (ID: %s) removed the Namechange cooldown from %s (ID: %s)!",
        allremoved_webhook = "Admin %s (ID: %s) cleared all Namechange cooldowns!",
    },
}

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.NameConfig = {
    Minlength = 3,
    Maxlength = 10, -- Maximum 20 characters allowed. Longer names may cause database errors.
    blacklist = {
        "discord.gg",
        "http",
        "https",
        "www.",
        ".com",
        ".de",
        ".net",
    }
}

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

-- Commands: (/namechange {name} {data})
-- /namechange removecooldown {playerid or "me" | Example: 1}
-- /namechange clearallcooldowns
ArrayServer.Commands = {
    ["removecooldown"] = {
        console = true,
        groups = {
            ["admin"] = true
        }
    },
    ["clearallcooldowns"] = {
        console = true,
        groups = {
            ["admin"] = true
        }
    },
}
```

{% 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;
}
```

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

## CSS Themes

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

```css
:root {
  --main_color: #E63A4A;
  --main_background: #14040A;
  --title_div_color_2: #991D2B;
  --button_color_2: #2B0F14;
}
```

{% endcode %}
{% endtab %}

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

```css
:root {
  --main_color: #3A7BE6;
  --main_background: #040F14;
  --title_div_color_2: #1D5A99;
  --button_color_2: #0F1F2B;
}
```

{% endcode %}
{% endtab %}

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

```css
:root {
  --main_color: #E6D23A;
  --main_background: #141204;
  --title_div_color_2: #99A11D;
  --button_color_2: #2B260F;
}
```

{% endcode %}
{% endtab %}

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

```css
:root {
  --main_color: #3AE67A;
  --main_background: #04140A;
  --title_div_color_2: #1D9947;
  --button_color_2: #0F2B18;
}
```

{% endcode %}
{% endtab %}

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

```css
:root {
  --main_color: #E68A3A;
  --main_background: #140804;
  --title_div_color_2: #99551D;
  --button_color_2: #2B160F;
}
```

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