Skip to main content

Context Menu

exports['wd-hud']:openMenu({
{
header = "Main Title",
isMenuHeader = true, -- Set to true to make a nonclickable title
},
{
header = "Menu Button",
txt = "This is a menu button.",
icon = 'FaTrash',
params = {
event = "wd-hud:debug",
args = {
number = 1,
}
}
},
{
header = "Sub Menu Button",
txt = "This goes to a sub menu",
sub = true,
params = {
event = "wd-hud:debug",
args = {
number = 1,
}
}
},
{
header = "Empty Menu Button",
txt = "This is an empty menu button.",
isMenuEmpty = true
},
})

or

TriggerEvent('wd-hud:openMenu', {
{
header = "Main Title",
isMenuHeader = true, -- Set to true to make a nonclickable title
},
{
header = "Menu Button",
txt = "This is a menu button.",
icon = 'FaTrash',
params = {
event = "wd-hud:debug",
args = {
number = 1,
}
}
},
{
header = "Sub Menu Button",
txt = "This goes to a sub menu",
sub = true,
params = {
event = "wd-hud:debug",
args = {
number = 1,
}
}
},
{
header = "Empty Menu Button",
txt = "This is an empty menu button.",
isMenuEmpty = true
},
})

Menu Variables

  1. header = Header of the menu.
  2. txt = Description of the menu.
  3. icon = Icon of the menu.
  4. params =
    1. event = Event name / command name / callback function for the menu.
    2. args = Action args.
    3. isServer = Declares the event if it is a server event.
    4. isCommand = Declares the event if it is a command.
    5. isAction = Declares the event if it is a callback function.
info

You can get menu icons from here.