Exports
Comprehensive instructions on configuring files and utilizing export functions.
Prior experience as a developer or basic programming skills are recommended to effectively navigate this section of the documentation.
The crm-radialmenu script allows you to dynamically add or remove menus and items using exports.
π‘qb-radiamenu bridge
If a script supports qb-radialmenu exports, you donβt need to reconfigure anything. crm-radialmenu includes an automatic compatibility bridge.
πΉ add
Add a new menu or add new items to an existing menu.
-- Add a new item to an existing menu:
exports['crm-radialmenu']:add(
{
crm_menu = "crm-citizen",
crm_items = {
{
crm_id = 'crm-test-item-1',
crm_title = "New Item 1",
crm_icon = "globe",
crm_close = true,
crm_click = function()
print('New Item 1 Clicked')
end,
},
{
crm_id = 'crm-test-item-2',
crm_title = "New Item 2",
crm_icon = "globe",
crm_close = true,
crm_action = {crm_type = "crm-client", crm_event = "qb-phone:client:GiveContactDetails", crm_args = {}},
},
},
}
)
-- Add a new menu to the radial:
exports['crm-radialmenu']:add(
{
crm_id = 'crm-new-menu',
crm_title = "My New Menu",
crm_icon = "car",
crm_items = {
{
crm_id = 'crm-new-menu-1',
crm_title = "Menu Item 1",
crm_icon = "car",
crm_close = true,
crm_command = "commandname", -- Execute /commandname
},
},
}
)πΉ remove
Remove items from an existing menu or remove an entire menu by ID.
Last updated