> For the complete documentation index, see [llms.txt](https://tefox-scripts.gitbook.io/tefox-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tefox-scripts.gitbook.io/tefox-scripts-docs/tefox-scripts-documentation/tefox_notify/configuration.md). Agents can also search and read this documentation through its [MCP server](https://tefox-scripts.gitbook.io/tefox-scripts-docs/~gitbook/mcp).

# Configuration

All options are in <mark style="color:yellow;">`config.lua`</mark><mark style="color:yellow;">.</mark>

**General**

```lua
Config.Framework = 'auto'
Config.SettingsCommand = 'notifysettings'
Config.SettingsKey = ''
Config.HideInPauseMenu = true
Config.CheckUpdates = true
```

| Option            | Default            | Description                                                              |
| ----------------- | ------------------ | ------------------------------------------------------------------------ |
| `Framework`       | `'auto'`           | `'auto'`, `'qb'`, `'esx'`, `'qbox'` or `'standalone'`                    |
| `SettingsCommand` | `'notifysettings'` | Command that opens the settings menu                                     |
| `SettingsKey`     | `''`               | Default key for the settings menu. Players can rebind it in GTA settings |
| `HideInPauseMenu` | `true`             | Hide notifications while the pause menu is open                          |
| `CheckUpdates`    | `true`             | Show a message in the server console when a new version is available     |

**Display**

```lua
Config.MaxVisible = 6
Config.Overflow = 'replace'
Config.DefaultDuration = 5000
Config.MergeDuplicates = true
```

| Option            | Default     | Description                                                                      |
| ----------------- | ----------- | -------------------------------------------------------------------------------- |
| `MaxVisible`      | `6`         | Maximum notifications on screen at once                                          |
| `Overflow`        | `'replace'` | `'replace'` removes the oldest notification, `'queue'` waits until there's space |
| `DefaultDuration` | `5000`      | Default duration in milliseconds                                                 |
| `MergeDuplicates` | `true`      | Identical notifications merge into one with a counter (`x2`, `x3`...)            |

**Storage**

```lua
Config.Storage = 'database'
```

| Value        | Description                                                                                                   |
| ------------ | ------------------------------------------------------------------------------------------------------------- |
| `'database'` | Saves player settings in the database with a local cache. Falls back to local storage if oxmysql is not found |
| `'kvp'`      | Saves player settings locally on each player's PC only                                                        |

The database table is created automatically on the first start. No SQL import is needed.

**Compatibility**

```lua
Config.Compatibility = {
    okokNotify = true,
    mythic_notify = true,
}
```

When enabled and the original resource is **not installed**, scripts using `okokNotify` or `mythic_notify` events will show TEFOX Notify instead.

**Announcements**

```lua
Config.Announce = {
    enabled = true,
    command = 'announce',
    title = 'Server Announcement',
    duration = 10000,
}
```

Sends a notification to every player with `/announce <message>`. Only admins with command permissions can use it.

**Player Defaults**

Default settings for new players. Each player can change them from the settings menu.

```lua
Config.Defaults = {
    position = 'top-right',
    customX = 70, customY = 5, customB = 85,
    theme = 'dark',
    accent = '#7c5cff',
    unified = false,
    scale = 1.0,
    opacity = 0.92,
    animation = 'slide',
    volume = 0.5,
    muted = false,
}
```

| Option      | Values                                                                                                                                                              |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `position`  | `'top-left'`, `'top-center'`, `'top-right'`, `'middle-left'`, `'middle-center'`, `'middle-right'`, `'bottom-left'`, `'bottom-center'`, `'bottom-right'`, `'custom'` |
| `theme`     | `'dark'`, `'light'` or `'auto'` (Day / Night)                                                                                                                       |
| `accent`    | Any hex color                                                                                                                                                       |
| `unified`   | `true` to use the accent color for all notification types                                                                                                           |
| `scale`     | `0.8` to `1.3`                                                                                                                                                      |
| `opacity`   | `0.6` to `1.0`                                                                                                                                                      |
| `animation` | `'slide'`, `'fade'`, `'scale'` or `'none'`                                                                                                                          |
| `volume`    | `0.0` to `1.0`                                                                                                                                                      |

**Notification Types**

```lua
Config.Types = {
    success   = { title = 'Success', color = '#22c55e', icon = 'check',  sound = 'chime' },
    error     = { title = 'Error',   color = '#ef4444', icon = 'x',      sound = 'buzz' },
    warning   = { title = 'Warning', color = '#f59e0b', icon = 'alert',  sound = 'alert' },
    info      = { title = 'Info',    color = '#3b82f6', icon = 'info',   sound = 'pop' },
    police    = { title = 'Police',  color = '#2563eb', icon = 'shield', sound = 'radio' },
    ambulance = { title = 'EMS',     color = '#ec4899', icon = 'cross',  sound = 'radio' },
    bank      = { title = 'Bank',    color = '#10b981', icon = 'card',   sound = 'chime' },
    phone     = { title = 'Phone',   color = '#8b5cf6', icon = 'phone',  sound = 'bell' },
}
```

To add your own type, add a new line:

```lua
    mechanic = { title = 'Mechanic', color = '#f97316', icon = 'car', sound = 'chime' },
```

* **Icons:** `check`, `x`, `alert`, `info`, `shield`, `cross`, `card`, `bell`, `phone`, `car`, `star`, `lock`, or any image URL
* **Sounds:** `pop`, `chime`, `soft`, `alert`, `buzz`, `bell`, `radio`, `none`, or a key from `Config.CustomSounds`

**Type Aliases**

Alternative names that point to an existing type, so scripts using other names still show the right style.

```lua
Config.TypeAliases = {
    primary = 'info', inform = 'info', warn = 'warning', danger = 'error',
    ems = 'ambulance', medic = 'ambulance', cop = 'police',
}
```

**Custom Sounds**

Place your sound file in `web/sounds/` and register it:

```lua
Config.CustomSounds = {
    siren = 'sounds/siren.ogg',
}
```

It becomes available in the player settings menu and can be used in any type.
