Docsob_notifyInstallation

Installation

From the zip to working notifications. Three steps, no database, and no editing the resources you already run.


Before you start

ob_notify needs no dependencies. If you are coming from another notification resource, you do not have to uninstall it yet: you can test with both in place.

Install

  1. 1

    Download the resource

    From your Cfx.re account, where the assets you own show up.

  2. 2

    Drop it into resources

    Unzip the folder inside resources/. The name has to end up exactly ob_notify.

    Terminal
    resources/
    └── [orbe]/
        └── ob_notify/
    Do not rename it

    Exports are called by the resource name. If the folder is called ob_notify-main — as some downloads arrive — no script will find it.

  3. 3

    Add it to server.cfg

    server.cfg
    ensure ob_notify

    Before the resources that will use it. If it starts later, the ones already running will not find it.

  4. 4

    Check that it works

    Start the server and type in the client console:

    Terminal
    /obnotify

    If you see one notification of each type, it is installed. There is no step five.

Making your existing scripts use it

Nothing to edit. ob_notify steps in front of the QBCore and ESX calls and paints them with its own interface. The hundred resources on your server keep calling what they always called.

If your server runs What to do
QBCore Nothing
ESX Install the bridges, below
ox_lib Nothing
Your own calls Use the exports
ESX — install the bridges

Only if you run ESX. They replace esx_notify and esx_textui, and ship inside the resource itself:

Terminal
resources/[orbe]/ob_notify/bridge/esx_notify/
resources/[orbe]/ob_notify/bridge/esx_textui/

Copy them over the originals and restart the server.

QBCore — icons that are not recognised

QBCore mixes Font Awesome and Material Icons classes in the same field. If a resource asks for an icon we do not recognise, the generic one for its type shows up instead.

Run:

Terminal
/obnotify qb

Seven notices come out with the odd icons QBCore uses most. If any falls back to the generic one, add its alias in config.lua:

Lua
Config.IconAliases = {
    ['fas fa-wrench'] = 'wrench',
    ['attach_money']  = 'money',
    ['local_police']  = 'shield'
}

Test commands

All of them autocomplete in the console with F8.

Command What it does
/obnotify One of each type, in a row
/obnotify success A specific type
/obnotify iconos All 27 icons with their name below
/obnotify qb The odd QBCore icons. The real test
/obnotify largo Long text, to see how it wraps
/obnotify rafaga 12 in a row, to see the queue and the +N
/obnotify proceso One notification updating itself by id
/obnotify limpiar Clears the stack
/obtextui Toggles the TextUI
/obtextui pulsar Simulates the key press
/notify Opens the settings panel

If something breaks

What you see Cause Fix
Nothing shows up The resource did not start Check the server console at boot
The old notifications still show ob_notify started later Move it up in server.cfg
No such export show The folder is not called ob_notify Rename it
Generic icons on QBCore An alias is missing Add it to Config.IconAliases