Notifications
Send DynamicHUD notifications directly or replace ox_lib notifications without changing call sites.
Notifications
notify and Notify are equivalent client exports. Notifications may also be triggered through the client event.
exports['orbit-dynamichud-v2']:notify({
title = 'Garage',
description = 'Vehicle stored successfully.',
type = 'success',
duration = 3500
})TriggerEvent('orbit-dynamichud:notify', {
description = 'You do not have the required item.',
type = 'error',
duration = 4000
})A server script targets a client:
TriggerClientEvent('orbit-dynamichud:notify', source, {
title = 'Server',
description = 'Welcome back.',
type = 'info',
duration = 3000
})Payload
| Field | Type | Default | Description |
|---|---|---|---|
id | string? | generated | Unique ID. A notification with an ID already visible is ignored. |
title | string? | localized by type | Heading. Omit it to use the localized type label. |
description | string? | "" | Notification body. |
type | string? | "info" | primary, inform, info, warning, error, or success. |
duration | number? | 3000 | Display duration in milliseconds. |
icon | string? | type icon | Free Font Awesome icon name or classes. |
color | string? | type color | CSS color for the accent and duration bar. |
iconColor | string? | color | CSS color for the notification icon. |
When title is omitted, the resource uses notification_info, notification_warning, notification_err, or notification_success from the active locale.
exports['orbit-dynamichud-v2']:Notify({
id = 'vehicle_locked',
description = 'Vehicle locked.',
type = 'inform',
icon = 'fas fa-lock',
color = '#71B6F7',
iconColor = '#FFFFFF',
duration = 2500
})ox_lib drop-in replacement
Add this after @ox_lib/init.lua in the resource. Existing lib.notify(data) calls require no changes.
lib = lib or {}
lib.notify = function(data)
return exports['orbit-dynamichud-v2']:notify(data)
endCore ox_lib fields (id, title, description, duration, type, icon, and iconColor) map directly. DynamicHUD owns placement and styling, so ox_lib-only fields such as position, nested style, showDuration, and sound do not change the DynamicHUD notification presentation.
See the complete compatibility bridge when replacing all four interfaces.