X3D Notify
Notification cards in nine positions, with item icons and rarity frames, and full Thai support.
Buy / Get freeConfig builderInstallation
ensure x3d_notify
Remove the stock esx_notify first, since two of them open overlapping NUIs.
Old scripts still call exports['esx_notify']? Move optional/esx_notify/ into resources/ and ensure esx_notify after x3d_notify. It is a twelve-line forwarder, so nothing you already run has to change.
ensure x3d_notify
ensure esx_notify # only if old scripts call that name
Configuration (config.lua)
| Key | Default | Meaning |
|---|---|---|
Config.position |
middle-right |
Default card position (used when a call gives none) |
Config.notificationSoundEnabled |
true |
Play the notification sound |
Config.Debug |
false |
Print every notification to the client console |
Usage
-- client
exports['x3d_notify']:Notify(type, length, message, title, position, icon, iconBg)
exports['x3d_notify']:Success(message, length, title, position)
exports['x3d_notify']:Error(message, length, title, position)
exports['x3d_notify']:Warning(message, length, title, position)
exports['x3d_notify']:Info(message, length, title, position)
exports['x3d_notify']:ClearAll()
exports['x3d_notify']:SetConfig(position, soundEnabled)
-- server
TriggerClientEvent('ESX:Notify', source, type, length, message, title, position)
type is success, error, warning or info and drives the colour and icon.
length is the display time in milliseconds, 3000 when omitted.
title is whatever you pass; when omitted the card shows the type name.
icon / iconBg are the item image and the rarity frame image.
position is top-right, top-left, top-center, bottom-right, bottom-left, bottom-center, left-center, right-center or center; when omitted Config.position is used.
Colour codes
~r~ red, ~g~ green, ~b~ blue, ~y~ yellow, ~p~ purple, ~o~ orange, ~s~ reset, ~br~ line break.
exports['x3d_notify']:Error('Not enough cash, need ~r~$5,000~s~', 4000, 'Payment')
Test command
Type /testnotify in game to check that cards appear.