> For the complete documentation index, see [llms.txt](https://docs.hyper-code.eu/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyper-code.eu/documentation/advanced-notification/config.md).

# Premium Notify – Configuration

All options in shared/config.lua of Premium Notify: framework, notification types, progress bar, help notification, announcements and the announce command.

All settings are in `shared/config.lua`. This file is not escrowed.

Colours accept every CSS colour value, for example `"rgb(255, 0, 64)"`, `"#FF0040"` or `"white"`.

## Framework

| Option             | Default         | Description                                                                                                                                                                                       |
| ------------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Framework` | `"es_extended"` | Resource name of your framework (`es_extended`, `qb-core` or a custom name). Only used for the [`/announce`](https://docs.hyper-code.eu/documentation/advanced-notification/commands.md) command. |

## Notifications

```lua
Config.Notification = {
    DefaultType = "default",       -- used if no type is given
    DefaultTitle = "Notification", -- used if no title is given

    Types = {
        ["success"] = {
            LightColor = "rgb(0, 200, 0)",
            DarkColor = "rgb(0, 110, 0)",
            TextColor = "white",
            Icon = "fa-sharp fa-solid fa-check",
            IconColor = "white",
        },
        -- add as many types as you like
    }
}
```

| Option         | Default                               | Description                                                                                       |
| -------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `DefaultType`  | `"default"`                           | Type used when a script sends no type or a type that does not exist                               |
| `DefaultTitle` | `"Notification"`                      | Title used when a script sends no title                                                           |
| `Types`        | `default`, `info`, `success`, `error` | One entry per notification type. The key (for example `"success"`) is the type name scripts send. |

Fields of every type:

| Field                    | Description                                                                                                      |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| `LightColor`             | Accent colour: border corners, icon, title and progress line                                                     |
| `TextColor`              | Colour of the message text                                                                                       |
| `Icon`                   | Font Awesome classes, for example `"fa-sharp fa-solid fa-bell"` ([icon search](https://fontawesome.com/search))  |
| `DarkColor`, `IconColor` | Present in every type, but the current notification design does not use them. The icon is drawn in `LightColor`. |

{% hint style="info" %}
To add a new type, copy an entry, give it a new key (for example `["police"]`) and send that key as the type: `exports['hc_notify']:notify("Text", "Title", "police", 5000)`.
{% endhint %}

## Progress bar

| Option                          | Default             | Description                                              |
| ------------------------------- | ------------------- | -------------------------------------------------------- |
| `Config.Progressbar.LightColor` | `"rgb(255, 0, 64)"` | Colour of the bar                                        |
| `Config.Progressbar.DarkColor`  | `"rgb(138, 0, 34)"` | Present, but not used by the current progress bar design |
| `Config.Progressbar.FontColor`  | `"#ffffff"`         | Colour of the text above the bar                         |

A script can pass its own colour table as the `options` argument of the [progress bar export](https://docs.hyper-code.eu/documentation/advanced-notification/exports-and-events.md#progress-bar). Otherwise these values are used.

## Help notification

| Option                         | Default             | Description                            |
| ------------------------------ | ------------------- | -------------------------------------- |
| `Config.HelpNotify.LightColor` | `"rgb(255, 0, 64)"` | Colour of the key letter and its frame |
| `Config.HelpNotify.TextColor`  | `"#ffffff"`         | Colour of the text                     |
| `Config.HelpNotify.BlurColor`  | `"rgb(255, 0, 64)"` | Colour of the glow behind the key      |

## Announcements

| Option                       | Default             | Description                                     |
| ---------------------------- | ------------------- | ----------------------------------------------- |
| `Config.Announce.LightColor` | `"rgb(255, 0, 64)"` | Accent colour: corners, title and progress line |
| `Config.Announce.DarkColor`  | `"rgb(138, 0, 34)"` | Colour of the background gradient               |
| `Config.Announce.TextColor`  | `"#FFFFFF"`         | Colour of the message text                      |

## Announce command

```lua
Config.AnnounceCommand = {
    Command = "announce",
    AdminGroup = "owner",
    Title = "Server Announcement",
    Duration = 5000 -- 5 seconds
}
```

| Option       | Default                 | Description                                               |
| ------------ | ----------------------- | --------------------------------------------------------- |
| `Command`    | `"announce"`            | Name of the chat command                                  |
| `AdminGroup` | `"owner"`               | ESX group or QBCore permission allowed to use the command |
| `Title`      | `"Server Announcement"` | Title of every announcement sent with the command         |
| `Duration`   | `5000`                  | Display time in milliseconds                              |

{% hint style="warning" %}
`owner` is not a default group in ESX Legacy or QBCore. Set `AdminGroup` to a group that exists on your server, for example `admin`.
{% endhint %}

See [Commands](https://docs.hyper-code.eu/documentation/advanced-notification/commands.md).
