Skip to main content

BenzyNotifications

BenzyNotifications

A clean, standalone FiveM toast notification system. It draws a small stack of notifications in the corner of the screen — a color accent, an icon, a title, your message, and a countdown bar — and fades them on a timer you control. Any resource shows one with a single export, so every script on your server can route its alerts through it and speak with one voice. No framework, no database, no dependencies.

Made by Samuel Benzy of Benzy Development.


Features

  • One-line notificationsexports.BenzyNotifications:Notify(kind, title, message) from any client, or exports.BenzyNotifications:Notify(source, ...) from the server to push one to a player.
  • An abundant API — generic Notify, per-kind shorthands (Success, Error, Info, Warning, Request), NotifyAll/Broadcast, and Clear, on both client and server, plus matching events — so any resource can plug in however it likes (docs/EXPORTS.md, docs/EVENTS.md).
  • Flexible input — pass positional args or an options table, and it accepts the field names other notify systems use (type, description, length, …), so many scripts work unchanged.
  • Five stylessuccess, error, info, warning, and request, each with its own accent color and icon — all recolorable in the config.
  • Adjustable duration — set how long toasts stay on screen in one config line; a caller can still override it per notification.
  • Eight positions — anchor the stack to any corner, edge-center, or the middle of either side.
  • A tidy stack — toasts pile up to a configurable limit, the oldest sliding out to make room, each with a countdown bar showing its time left.
  • Passive — the toast layer never grabs your mouse or keyboard, so notifications appear whether a menu is open or not.
  • Standalone — no framework (ESX/QBCore) and no database required, no permissions to set up.

How it works

  • The client runs a small notify funnel (BenzyNotify) that normalises a message and shows it as a toast that fades after its duration. It never takes focus, so it works with any menu open or closed.
  • The server side is just a router: Notify(source, ...) and NotifyAll(...) trigger a client event on the target player(s), and the client renders it.
  • Everything visual — the position, how long toasts stay, how many stack, and each style's color + icon — is read from config.lua and applied when it loads, so a config change is all it takes to restyle.

Requirements

  • A FiveM server. That's it — BenzyNotifications is standalone.

Installation

  1. Place the BenzyNotifications folder in your server's resources directory.
  2. Add it to your server.cfg, before any resource that shows notifications through it:
    ensure BenzyNotifications
  3. Open config.lua and set the duration, position, and styles to taste.
  4. Restart the server (or ensure/restart BenzyNotifications).

Need to preview placement + timing? Set Config.TestCommand = true in config.lua, then run /testnotify [kind] in-game.


Configuration

Everything is configured in config.lua, and every option has a comment above it explaining what it does. The highlights:

Timing & layout

OptionWhat it does
Config.DurationMilliseconds a toast stays before it fades (default 6000). A caller may override this per notification.
Config.PositionWhere the stack sits — see Positions.
Config.MaxVisibleHow many toasts stack at once before the oldest slides out.

Appearance

OptionWhat it does
Config.KindsOne entry per style — its accent color (any CSS color) and icon glyph. Add a key to define a new style; unknown kinds fall back to info.

Sound

OptionWhat it does
Config.Sound.EnabledPlay a subtle front-end sound as each toast appears (off by default).
Config.Sound.Library / Config.Sound.NameThe GTA sound set + sample to play.

Debug & locale

OptionWhat it does
Config.DebugLogs each toast to the console + F8. Leave off on a live server.
Config.TestCommandtrue adds the /testnotify preview command (off by default). No permission needed; it only shows to the caller.
Config.LocaleActive language code (default 'en').

Notification kinds

The kind sets the toast's accent color (the left bar + the icon chip) and its icon:

KindDefault colorIconUse it for
successGreen #2ecc71Something worked — paid, saved, crafted, stored.
errorRed #e74c3cSomething failed or is blocked.
infoBlue #3498dbiNeutral information. The fallback for any unknown kind.
warningAmber #f39c12!A heads-up — low fuel, running out of time.
requestGold #f1c40f?An incoming ask — a money request, an invite.

'warn' is accepted as an alias of 'warning', and anything unrecognized falls back to info. Every color + icon is set in Config.Kinds — change one, or add a whole new kind. The full list, with the accepted call styles, is in docs/EXPORTS.md.


Positions

Set Config.Position to one of:

top-left top-center top-right
center-left center-right
bottom-left bottom-center bottom-right

Top and center stacks put the newest toast on top; bottom stacks rise up from the bottom.


Commands

  • /testnotify [kind] — show a sample toast locally so you can preview the position + timing. kind is optional (success, error, info, warning, request; defaults to info). Enable it by setting Config.TestCommand = true (off by default); no permission needed, and it only ever shows to the player who runs it.

Integrating with other resources

BenzyNotifications is built to be the notifier for your other scripts. The docs cover it:

Its Notify(kind, title, message, duration) export is the common notify signature, and it also accepts an options table and per-kind shorthands, so most resources can switch to it with a one-line change.


Notes

  • Toasts are purely visual and client-side. Nothing is saved — a toast shows, fades, and is gone. If you need a persistent, per-player alerts inbox, that's a separate kind of tool.
  • The layer is passive. It stays passive, so it never captures your cursor or keys; toasts appear over any menu.

Troubleshooting

  • Turn on debug logging first — set Config.Debug = true, restart the resource, and watch the server console + each client's F8. Every toast (and every broadcast) is logged with its kind, title, and message.
  • Nothing shows — make sure BenzyNotifications is started, and (for pushes from another resource) that it starts before that resource in server.cfg. Run /testnotify to confirm the layer itself is working.
  • Toasts are in the wrong place — set Config.Position and restart. Use /testnotify to preview each anchor.
  • They vanish too fast / stay too long — tune Config.Duration (milliseconds). Individual callers can pass their own duration too.
  • A style looks wrong — check Config.Kinds for that kind's color and icon. Unknown kinds fall back to info.

Support

Need help? Visit support.benzy.lol.


Credits

Made by Samuel Benzy of Benzy Development.

Website: https://benzy.lol