Skip to main content

Context Menu

How to use Context Menu:

TriggerClientEvent('wd-uikit:openMenu', source, {
{
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-uikit:debug",
args = {
number = 1,
}
}
},
{
header = "Sub Menu Button",
txt = "This goes to a sub menu",
sub = true,
params = {
event = "wd-uikitv2: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. isMenuHeader = Declares the menu is the header.
  5. isMenuEmpty = Declares the menu is empty.
  6. 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.