esx_menu_dialog

MLO-uri, interioare, hărți optimizate și asset-uri pentru stream.
Post Reply
User avatar
greenie
Full Member
Full Member
Posts: 4444
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Da

esx_menu_dialog

Post by greenie »

ESX.UI.Menu.Open
Open a menu that can be used to input a value

ESX.UI.Menu.Open(type, namespace, name, data, confirm, cancel )
Arguments

type: string
the menu to open dialog in this case
namespace: string
The namespace of the menu, usually GetResourceName()is used
name: string
The name of the menu
data: table
The table with the elements to show in the menu
confirm: function
Function that gets ran when an element is selected.
cancel: function
Function that gets ran when the menu gets closed
Data table

title: title of the menu
confirm

Function triggered when the confirm button is pressed, returns data and menu, data.value is used to get the current vlue inserted

cancel

This function is triggered when the cancel button is pressed or the menu is closed, returns data and menu

Menu Example
ESX.UI.Menu.Open("dialog", GetCurrentResourceName(), "Example_Menu", {
title = "Example Menu", -- The Name of Menu to show to users,
}, function(data,menu) -- confirm function
local value = data.value
print(value)
menu.close()
end,
function(data, menu) -- Cancel Function
print("Closing Menu")
menu.close() -- close menu
end)
𝑴𝒂𝒚𝒃𝒆 𝒕𝒉𝒆 𝑬𝒂𝒓𝒕𝒉 𝒊𝒔 𝒕𝒉𝒆 𝑯𝒆𝒍𝒍 𝒐𝒇 𝑨𝒏𝒐𝒕𝒉𝒆𝒓 𝑷𝒍𝒂𝒏𝒆𝒕... ☢️

✅ GAZDUIRE JOCURI / VPS / GAZDUIRE WEB / SERVERE DEDICATE - Stock NELIMITAT / Valabil comandati pe https://www.zonek.ro/
Post Reply

Return to “Server Resources”