LV Soft FiveM
  • LV SOFT
    • 👋Welcome!
    • 🛒Tebex
    • 💬Discord
  • QB/ESX
    • ☮️lvs-loading
      • Installation
      • Configuration
    • 👫lvs-multichar
      • Installation
      • Configuration
      • Adding Scenes
      • Tebex Integration
      • Commands
    • 🗺️lvs-spawnselector
      • Installation
      • Configuration
    • 🥼lvs-clothing
      • Installation
        • QBCore Install
        • ESX Install
      • Configuration
      • Migration
        • qb-clothing
        • esx-skinchanger
        • Illenium-Appareance
      • Blacklisting
      • Events
      • Commands
    • ⚙️lvs-lib
      • black-screen loading
      • notifications
      • progressbar
      • key-interaction
      • textui
      • alert
      • context menu
      • context input
    • 💬lvs-chat
      • Installation
      • Configuration
      • Events & Exports
    • 📱lvs-radio
      • Installation
      • Configuration
      • Events & Exports
    • 🗃️lvs-playerlist
      • Installation
      • Configuration
    • 📹lvs_weazelnews
      • Installation
      • Configuration
    • 🎒lvs-inventory
      • Installation
      • Configuration
      • lvs-inventory
        • exports
      • lvs-shops
        • Configuration
        • Exports
      • lvs-crafting
    • 🪪lvs-idmanager
      • Installation
      • Configuration
      • Exports
  • Standalone
    • 🚘lvs-drift
      • Installation
      • Configuration
      • Commands
    • 🕺lvs-animations
      • Installation
      • Configuration
      • Adding Animations
      • Exports/Events
    • 💥lvs-accident
      • Installation
      • Configuration
    • 🔥lvs-explosion
      • Installation
      • Configuration
    • 🏎️lvs-racing
  • ESX
    • 📅Soon
Powered by GitBook
On this page
  • Context Menu
  • How to use:
  • qb-menu replacement
  1. QB/ESX
  2. lvs-lib

context menu

PreviousalertNextcontext input

Last updated 3 months ago

Fontawesome is used to add icons to the list items, you can find the code .

Context Menu


How to use:

Client-side using exports

Example:

-- menu table
local menu = {
	{
		header = "Item #1",
		txt = "This trigger an event",
		icon = "fas fa-user", -- add icon to item
		--disabled = true, -- make item disabled
		params = {
			event = "event:client:test1",
			args = {
				number = 1,
			}
		}
	},
	{
		header = "Item #2",
		txt = "Can trigger a event to open a submenu",
		params = {
			event = "qb-menu:client:test2",
			args = {
				number = 2,
			}
		}
	},
}

-- open context menu
exports.lvs_lib:openContext('Menu Title', menu)


-- close context menu
exports.lvs_lib:closeContext()

qb-menu replacement

To replace qb-menu with this script, you need to enable the functionality in the config.lua and remove a comment in the fxmanifest.lua

fxmanifest.lua (line 58)
provide 'qb-menu'
config.lua
--- ### CONTEXT ###
-- make lvs context menu replace of qb-menu
-- uncomment line 57 on fxmanifest.lua [provide 'qb-menu']
-- remove qb-menu
Config.ContextAsQBMenu = true
Config.QBMenuCommand = {
    name = 'playerfocus',
    description = 'Give Menu Focus',
    key = 'Alt',
    keymapping = 'LMENU'
}
⚙️
here