🤠 Wild Country Libs
Client API

Notify

VORP ships 17 named notify styles. RSG Core has none of its own, so it delegates to ox_lib's single lib.notify. wc_libs gives you full access to every VORP variant on the client, maps each one down to RSG when needed, and includes server bridge helpers for notifying a player from server code.

Notify(opts)client

Sends a notification for the local player using whichever framework is active.

FieldTypeUsed by
variantstring | nilPicks a VORP style. Defaults to 'avanced'.
titlestringAll variants.
subtitlestring | nilleft, simpletop, fail, update, warning, leftrank, leftinteractive
dict / iconstring | nilleft, avanced, leftrank, leftinteractive
colorstring | nilleft, avanced, leftrank, leftinteractive
durationnumber | nilAll variants. Defaults to 4000ms (-1 on leftinteractive = stays on screen).
quality / showQualitynumber / booleanavanced only.
audioref / audionamestring | nildead, warning
second_descriptionstring | nilthreesimpletop only
locationstring | niltop only

Try it — pick a variant and a framework, see what wc_lib actually calls underneath:

underneath, on —
your code (same on both)
wc:Notify({
  variant = 'righttip',
  title   = "Job updated: Marshal",
  duration = 4000,
})
vorp_core — exact variant, full fidelity
Core.NotifyRightTip("Job updated: Marshal", 4000)
rsg — collapsed to ox_lib's one notify type
lib.notify({
  title    = "Job updated: Marshal",
  type     = 'inform',
  duration = 4000,
})
Visual fidelity is intentionally asymmetric. VORP is the richer "main" experience this lib is built around — every one of its 17 variants is preserved exactly. RSG gets the closest reasonable fallback, not a 1:1 match, since ox_lib's notify just doesn't have that many distinct visual styles to map to.
Server bridge. From server code, call wc:Notify(source, opts) to forward the same options to one player through wc_libs:client:notify. You can also call wc:WcNotify(source, msg, level, placement) to send through wc_notify:send.
server example
wc:Notify(source, {
  variant = 'righttip',
  title   = "Job updated: Marshal",
  duration = 4000,
})

wc:WcNotify(source, 'Reward accepted', 'SUCCESS')
WcTip(msg, duration, opts)client

Shows a compact wc_libs NUI toast prompt using nui/image/toast.png.

ParamTypeDescription
msgstringText displayed inside the toast.
durationnumber | nilDuration in milliseconds. Defaults to 3000.
optstable | nilOptional placement, y, and rtl overrides.
client example
wc:WcTip('Help... somebody... please!', 3000)

wc:wctip('Bring the sack to the wagon.', 4000, {
  y = '74vh',
})
Toast asset. Place the background image at D:\wc_libs\nui\image\toast.png. For right-to-left styling, also provide toast-rtl.png.
NotifyIcon(source, text, icon, color, duration, dict?)server

Sends a VORP avanced-style notification with an item icon to a specific player from server code. Falls back to WcNotify if VORP is unavailable.

ParamTypeDescription
sourcenumberServer-side player source.
textstringNotification text (e.g. "+$50").
iconstringItem icon key, e.g. 'itemtype_cash'.
colorstringColor name, e.g. 'COLOR_WHITE'.
durationnumberDisplay time in milliseconds.
dictstring | nilTexture dictionary override. Defaults to 'itemtype_textures'.
server example — cash reward
wc:NotifyIcon(source, "+$50", 'itemtype_cash', 'COLOR_WHITE', 3000)
Server-only. From the client, use wc:Notify({ variant = 'avanced', ... }) instead.

Variant reference

Every VORP variant, and what it collapses to on RSG.

variantVORP callRSG fallback type
avanced (default)NotifyAvancedsuccess
leftNotifyLeftinform
tipNotifyTipinform
righttipNotifyRightTipinform
objectiveNotifyObjectiveinform
topNotifyTopinform
simpletopNotifySimpleTopinform
centerNotifyCenterinform
bottomrightNotifyBottomRightinform
failNotifyFailerror
deadNotifyDeaderror
updateNotifyUpdatesuccess
warningNotifyWarningerror
leftrankNotifyLeftRanksuccess
onesimpletopNotifyOneSimpleTopinform
threesimpletopNotifyThreeSimpleTopinform
leftinteractiveNotifyLeftInteractiveinform
example — money reward (default variant)
-- no variant specified — uses 'avanced', the default
wc:Notify({
  title = "+$50",
  icon  = 'itemtype_cash',
  color = 'COLOR_WHITE',
})

More examples

success
wc:Notify({ variant = 'update', title = "Delivery complete!" })
error
wc:Notify({ variant = 'fail', title = "You don't have enough cash." })
warning
wc:Notify({ variant = 'warning', title = "Your horse is close to exhaustion." })
broadcast to every connected player
-- server: loop GetPlayers() to reach everyone, since Notify targets one source at a time
for _, pid in ipairs(GetPlayers()) do
  wc:WcNotify(tonumber(pid), 'Server restarting in 5 minutes.', 'WARNING')
end

Real Wild County example — trader sale confirmation

wc_trader/server/main.lua
wc:AddMoney(src, total, 0)
wc:Notify(src, {
  variant = 'avanced',
  title   = ("+$%.2f"):format(total),
  icon    = 'itemtype_cash',
  color   = 'COLOR_WHITE',
})

Common mistakes

Troubleshooting