open
-- ARGUMENTS
-- data: table [{
-- isHeader: boolean (optional)
-- label: string
-- icon: string
-- text: string
-- disabled: boolean (optional)
-- retEvent: string (optional)
-- retArgs: any (optional)
-- },...]
-- RETURNS
-- nil
local menu = {
{
isHeader = true,
label = "Shop",
icon = "fas fa-solid",
text = "A food store.",
disabled = true
},
{
label = "Water Bottle",
icon = "",
text = "$5",
retEvent = "buyItem",
retArgs = "water_bottle"
},
{
label = "Large Water Bottle",
icon = "",
text = "$10",
retEvent = "buyItem",
retArgs = "large_water_bottle"
}
}
ti.menus.open(menu)
AddEventHandler("buyItem",function(itemName)
print(itemName)
end)
Last updated