Skip to main content

ESX Menu Dialog

If you are a new developer in FiveM, you can read the FiveM Documentation to get a good start.

ESX.UI.Menu.CloseAll()
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'menuName', -- Change menu name
{
title = ('Your Title Here')
},
function(data, menu)
local amount = tonumber(data.value)
if amount == nil then
ESX.ShowNotification('Invalid Amount')
else
-- Here you put the function you want to perform.
-- To take text values use: data.value
-- To take number values use: amount (declared above)

menu.close()
end
end,
function(data, menu)
menu.close() -- Action when closing the menu
end)