# Notify Scripts for QBCore

> Notifications power announcements, job alerts, and player feedback. This guide outlines the most widely-used QBCore notification packages and shows how to wire them into your server.

## Why Notifications Matter

Clear notifications keep players informed about job updates, inventory changes, and server events. QBCore ships with a default notification function, but many servers replace it with community UI packages for a more modern look or additional features such as progress bars.

## Popular Options

| Script | Highlights | Ideal For |
|--------|------------|-----------|
| **qb-core Notify** | Default toast notification with minimal styling. | Servers that prefer zero dependencies and easy maintenance. |
| **ps-ui / ps-notify** | Configurable themes, queue handling, and progress bars. | Servers wanting a polished UI without heavy modification. |
| **okokNotify** | Premium notification system with animations and sound cues. | Roleplay servers that invest in commercial UI assets. |
| **mythic_notify** | Lightweight standalone notifications with support for icons. | Hybrid frameworks or servers migrating from ESX. |

## Installation Patterns

1. **Download** the notification package from the official source (GitHub or the developer's store).
2. **Place** the folder inside `resources/[standalone]` or `[qb]` depending on the author instructions.
3. **Ensure** the resource in `server.cfg` before scripts that trigger notifications.
4. **Update** exports in your scripts so they call the new notification function.
5. **Restart** the server and test each message type (success, error, info).

## Example Integrations

###

###

    ### `qb-core` default notification

    ```lua
    TriggerClientEvent('QBCore:Notify', src, 'Vehicle has been impounded.', 'error')
    ```

    The default export accepts a message string and an optional type (`success`, `primary`, `error`). It relies on the HTML assets bundled with `qb-core`.

###

    ### `ps-ui` / `ps-notify`

    ```lua
    exports['ps-ui']:Notify(
      src,
      "Dispatch",
      "10-80 in progress near Legion Square",
      7500,
      'dispatch'
    )
    ```

    Configure themes inside `ps-ui/config.lua`. Remember to toggle compatibility mode if you want to keep using `QBCore:Notify` calls.

###

    ### `okokNotify`

    ```lua
    exports['okokNotify']:Alert("Mechanic", "Your tow request has been received", 5000, 'info')
    ```

    `okokNotify` ships with sound effects and queue control. Make sure you provide the proper license key before restarting the resource.

## Replacing `QBCore:Notify`

Many third-party scripts trigger the core notification export. If you install a new system, create a wrapper in `qb-core/server/functions.lua` so legacy scripts continue to work:

```lua
RegisterNetEvent('QBCore:Notify', function(msg, type, duration)
    local src = source
    local notifyType = type or 'primary'
    local time = duration or 5000

    -- Forward to ps-ui by default
    exports['ps-ui']:Notify(src, 'Notification', msg, time, notifyType)
end)
```

## Styling Tips

- **Consistency**: Align colors with your HUD or framework theme.
- **Accessibility**: Keep text legible; avoid long paragraphs in notifications.
- **Rate limiting**: Prevent spam by throttling repeated notifications from the same script.
- **Sound cues**: Use subtle sounds to draw attention without overwhelming players.

## Troubleshooting

| Issue | Fix |
|-------|-----|
| Notifications do not appear | Confirm the resource is started and referenced correctly in exports. Check the client console (`F8`) for JavaScript errors. |
| Wrong notification style | Update your wrapper function or ensure the export names match the new system. |
| Sound continues after notification closes | Reduce `duration` or ensure the audio file stops in the UI script. |
| Too many notifications overlap | Enable queueing in the UI package (ps-ui and okokNotify both support this). |

## Additional Resources

- QBCore Notification Wrapper documentation
- [ps-ui GitHub repository](https://github.com/Project-Sloth/ps-ui)
- [okokNotify product page](https://okokscripts.com/)
- [mythic_notify GitHub repository](https://github.com/FlawwsX/mythic_notify)
