lation scripts
scriptsmembershipdocs
see the scripts
Skip to Content
lation ui
ThemingConfigurationChangelog

Developer API

Shared optionsNotificationsProgress barAlert dialogInput dialogContext menuList menuRadial menuText UITimelineDrawerMinigames
lation interact
lation banking
lation shops
lation jobs
lation weed
lation chop shop

classics

money laundering
drug sales
coke processing
meth crafting
metal detecting
scuba diving
lation ui

Alert dialog

Ask the player to confirm or cancel with a lation ui alert dialog, with optional callouts, button text, sizes and styles, and close it from your script.

An alert dialog shows a message in the middle of the screen with a confirm button and, by default, a cancel button. The call waits for the player's choice.

An alert dialog titled Sell vehicle asking Sell your Sultan RS for $12,500, with a red callout This can't be undone, and Keep it and Sell buttons
The Sell vehicle example, with an error callout

alert

Client export

local result = exports.lation_ui:alert(data)

Parameters

data.headerstringoptionaldefault 'Alert'
The title line
data.contentstringoptionaldefault 'Are you sure?'
The message
data.iconstringoptional
The icon beside the header, in class form such as 'fas fa-trash'. An info circle by default.
data.iconColorstringoptional
The header icon's color. The theme's icon color by default.
data.typestringoptionaldefault 'default'
The confirm button's style: 'default', 'success', 'warning', 'error', 'info' or 'destructive'
data.sizestringoptionaldefault 'sm'
The dialog's width: 'xs', 'sm', 'md', 'lg' or 'xl'
data.cancelbooleanoptionaldefault true
Show the cancel button
data.labelstableoptional
The button text: { confirm = '...', cancel = '...' }
data.confirmTextstringoptionaldefault 'Confirm'
The confirm button's text when labels.confirm isn't set
data.cancelTextstringoptionaldefault 'Cancel'
The cancel button's text when labels.cancel isn't set
data.calloutstableoptional
Highlighted notes under the message. See callouts.

Returns

string
'confirm' or 'cancel'

The call waits for the player, so run it from a thread, command or event handler. If data has neither header nor content, it returns 'cancel' without showing anything. header, content and callouts take text formatting.

Enter confirms and Escape cancels. Escape returns 'cancel' even when the cancel button is hidden.

The Sell vehicle dialog twice: on the left with Keep it and Sell buttons, on the right with cancel set to false and a single full-width Sell button
With the cancel button, and with cancel = false
client.lua
local result = exports.lation_ui:alert({
    header = 'Sell vehicle',
    content = 'Sell your **Sultan RS** for $12,500?',
    icon = 'fas fa-car',
    type = 'warning',
    labels = { confirm = 'Sell', cancel = 'Keep it' },
    callouts = {
        {
            label = 'This can\'t be undone',
            description = 'The vehicle and everything in its trunk are removed.',
            type = 'error'
        }
    }
})

if result == 'confirm' then
    TriggerServerEvent('my_script:sellVehicle')
end

Callouts

FieldTypeDefaultDescription
descriptionstringRequired. The callout's text.
labelstringA bold first line.
typestring'info''info', 'success', 'warning' or 'error'. Sets the color and icon.
iconstringThe type's iconReplaces the type's icon.
Four callouts in a dialog: Warning in amber with a triangle icon, Success in green with a check, Error in red, and a blue info callout titled Customizable with a rocket in place of the type's icon
The callout types, and one with its own icon

closeAlert

Client export

exports.lation_ui:closeAlert()

Closes the open alert from your script. A waiting alert call returns 'cancel'.

client.lua
-- Close the prompt if the buyer walks away
if #(GetEntityCoords(PlayerPedId()) - shopCoords) > 5.0 then
    exports.lation_ui:closeAlert()
end

Still stuck? Ask in our Discord: the people who write the scripts answer.

Last updated November 9, 2026

Progress bar

Run a lation ui progress bar with an animation, props other players see, steps, blocked controls and cancel handling, and check or cancel it from your script.

Input dialog

Collect values from the player with a lation ui input dialog, with text, number, toggle, select, slider, color, date and date range fields and checks on submit.

On this page

alertCalloutscloseAlert
lation scripts

FiveM scripts for Qbox, QBCore and ESX servers, made to look and work like one product.

store

  • all scripts
  • membership
  • classics

help

  • docs
  • discord
  • email support

legal

  • terms
  • refunds
  • privacy
© 2026 Lation Labslationscripts.com
  • home
  • scripts
  • membership
  • docs