METROLORE Docs
  1. Docs
  2. Notify & Progressbar
  3. Using Notify

M3Line M3 · Notify & ProgressbarView in store →

Using Notify

#The editor

Type /notifymenu. The menu lists five settings. Click a row and its options open in a panel next to the menu.

Setting What it changes
Notifications Design of the notification (six shapes).
Progress bar Layout of the progress bar.
Fill Fill style of the progress bar.
Background Surface of notifications and the progress bar. Presets, or a custom colour with opacity.
Accent Colour of lines, icons and the bar fill. Presets, or a custom colour.

Drag the dashed Notifications and Progress bar areas on screen to move them. Press Save changes to keep your choices. Use the X to close.

Note

Choosing a preset background or accent clears your custom colour. Colours are saved per player.

The editor: five settings on the left and a live preview you can drag into place.
The editor: five settings on the left and a live preview you can drag into place.
Solid notifications with a bold, striped progress bar and the teal accent.
Solid notifications with a bold, striped progress bar and the teal accent.
Edge notifications on the Light surface with a slim, segmented bar and the blue accent.
Edge notifications on the Light surface with a slim, segmented bar and the blue accent.

#Show a notification (client)

lua
exports['mlr-notify']:Notify('Saved', 'success', 4000)

Arguments: message, type, duration in milliseconds.

A table is also accepted, like QBCore and ESX use: { text = 'Saved', type = 'success', length = 4000 }.

#Show a notification (server)

Send it to a player from the server:

lua
TriggerClientEvent('mlr-notify:client:Notify', source, 'Paid', 'success', 4000)

#Progress bar

lua
exports['mlr-notify']:Progress({
    name = 'repair',
    label = 'Repairing',
    duration = 3000,
    canCancel = true,
    controlDisables = {
        disableMovement = true,
        disableCarMovement = true,
        disableCombat = true,
    },
}, function(cancelled)
    if cancelled then return end
    -- finished
end)