Notification
Display notifications to the player.
Export
| Export | Parameters |
|---|---|
Notify | (data) |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | No | Notification title |
description | string | Yes | Notification message — supports markdown (bold, italic, links) |
type | string | No | 'success', 'error', 'warning', or 'info' |
duration | number | No | Duration in ms (default: config value) |
position | string | No | Override default position ('top-right', 'top-left', 'top-center', 'bottom-right', 'bottom-left', 'bottom-center') |
icon | string | No | FontAwesome icon name or image URL |
iconColor | string | No | Custom icon color (hex or CSS color) |
iconAnimation | string | No | Icon animation: 'spin', 'beat', 'fade', 'bounce', 'shake', 'beatFade', 'spinPulse' |
id | string or number | No | Unique ID — passing the same ID replaces the existing notification |
style | table | No | Custom CSS styles or { backgroundColor, color } |
Usage
Basic Notification
exports['flux-ui-pack']:Notify({
title = 'Success',
description = 'Action completed',
type = 'success'
})With Custom Icon and Color
exports['flux-ui-pack']:Notify({
title = 'Vehicle Locked',
description = 'Your vehicle has been **locked**',
type = 'info',
icon = 'lock',
iconColor = '#3498db',
iconAnimation = 'bounce',
duration = 5000
})Error Notification
exports['flux-ui-pack']:Notify({
title = 'Error',
description = 'Something went wrong',
type = 'error',
duration = 5000
})Simple Notification
exports['flux-ui-pack']:Notify({
description = 'You picked up an item'
})Last updated on