default
{
label = "Order",
description = "Do you want to order? ~r~CLOSE MENU",
type = "button",
select = function(menu)
TriggerEvent("koth:notification", "On my way")
TriggerEvent("koth:closeMenu", menu)
end
},
Sub menu
{
label = "Sub Menu",
description = "Open the special submenu",
type = "button",
submenu = {
title = "Sub Menu",
description = "For smaller items",
items = {
{
label = "Pat pat",
description = "Do you want pets?",
type = "checked",
change = function(menu, newValue, oldValue)
if newValue == true then
TriggerEvent("koth:notification", "~g~Good job")
else
TriggerEvent("koth:notification", "~r~Or not")
end
end
},
{
label = "Disabled",
description = "you can't access this",
type = "checked"
}
}
},
change = function(menu, newValue, oldValue)
-- this isn't called when you have a submenu
if newValue == true then
TriggerEvent("koth:notification", "wait....")
else
TriggerEvent("koth:notification", "how?")
end
end
},