-- Adding Interaction Menu
exports["an_interMenu"]:add({
entity = entity, -- if you want to show the interaction menu on an entity, then use this and comment the one below
coords = coords, -- if you want to show the interaction menu on specific coords, then use this and comment the one above
actions = { -- check the demo on the client.lua for more information
[1] = {key = "X", label = "label", event = "SVevent:name", type = "sv", args = { entity = targetEntity }, useDist = 1.5 },
[2] = {key = "Y", label = "label", command = "command args1 args2 args3", useDist = 3.0 },
[3] = {key = "E", label = "label", event = "CLevent:name", type = "cl", args = {}, useDist = 6.0 },
},
showDist = 8.0,
offset = {x = 1.0, y = 2.0, z = 1.0}, -- this is used to set an offset for the menu when using an entity
handle = "something_unique_14581" -- a unique name ( must be different each time you add a new menu ) - used to identify interaction menus
})
Hiding an Interaction Menu
The Interaction Menu normally automatically hides when you're not in the required distance ( showDist ) but this method can force hide the Interaction Menu.
exports["an_interMenu"]:hide("something_unique_14581") -- use the same unique name that you typed when adding the interaction menu
Removing an Interaction Menu
Fully removes the interaction menu
exports["an_interMenu"]:remove("something_unique_14581") -- use the same unique name that you typed when adding the interaction menu