Exports

How to use tj utils in other scripts

Notifications

Client side

exports.tj_utils:ShowNotification({
    type = 'success', -- 'info', 'success', 'error', 'warning'
    title = 'Success',
    description = 'Action completed successfully',
    duration = 5000, -- ms
    position = 'top-right', -- See positions below
    icon = 'fa-check' -- Optional custom icon (uses Font Awesome)
})

Server side

TriggerClientEvent('tj_utils:notify', source, {
    type = 'info',
    title = 'Information',
    description = 'This is an info message',
    duration = 3000,
    position = 'top-right'
})

Progress bar

Client side

Start progress (simple)

exports.tj_utils:ShowProgress('Loading...')

Start progress (advanced)

exports.tj_utils:ShowProgress({
    label = 'Loading...',
    duration = 2000, -- ms
    position = 'middle', -- 'middle', 'top', 'bottom'
    icon = 'fa-spinner' -- Optional custom icon
})

Hide progress

exports.tj_utils:HideProgress()

Server side

Start progress

TriggerClientEvent('tj_utils:progress', source, {
    label = 'Loading...',
    duration = 2000, -- ms
    position = 'middle', -- 'middle', 'top', 'bottom'
    icon = 'fa-spinner' -- Optional custom icon
})

Text UI

Client side

Show Text UI (Simple)

exports.tj_utils:ShowTextUI('Press [E] to interact')

Show Text UI (Advanced)

exports.tj_utils:ShowTextUI({
    icon = 'fa-keyboard',
    title = 'Interaction',
    description = 'Press [E] to interact',
    position = 'middle-right' -- See positions below
})

Hide Text UI

exports.tj_utils:HideTextUI()

Server side

Start Text UI

TriggerClientEvent('tj_utils:showTextUI', source, {
    icon = 'fa-keyboard',
    title = 'Interaction',
    description = 'Press [E] to interact',
    position = 'middle-right' -- See positions below
})

Hide Text UI

TriggerClientEvent('tj_utils:hideTextUI', source)

Positions

  • Notifications: 'top-right', 'top-left', 'bottom-right', 'bottom-left'

  • Progress Bar: 'middle', 'top', 'bottom'

  • TextUI:

    • 'middle'

    • 'middle-right'

    • 'middle-left'

    • 'top-right'

    • 'top-left'

    • 'top'

    • 'bottom-right'

    • 'bottom-left'

    • 'bottom'

Last updated