Job Lock & Multi Job
If you use any Framework on you Server you can take advantage of the feature, that you can lock the x menu for certian jobs or even have different menus for any job.
Job lock
Config.UseFramework = false
Config.Framework = "ESX"
Config.UseEsxExport = false
To use the job lock feature, simply go to line 159 in config.lua and set Config.JobLock = true
. Then you can configure the jobs which can open the menu in line 160.
Config.JobLock = true
Config.Jobs = {'police', 'ambulance'}
Multi Job
Players can have a different menu depending on their job. To configure this go to line 164 in config.lua and set Config.MultiJob = true
then you can configure the job specific menus in Config.JobMenus
. Here is an example:
Config.JobMenus = {
["police"] = {
['button0'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end
submenu = {
active = false,
}
},
['button1'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end,
submenu = { -- Example sub menu
active = true,
['button1'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end
},
['button2'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end
},
['button3'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end
}
}
},
['button2'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end
submenu = {
active = false,
}
},
['button3'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end
submenu = {
active = false,
}
},
['button4'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end
submenu = {
active = false,
}
},
['button5'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end
submenu = {
active = false,
}
},
['button6'] = {
active = true,
image = "imgs/police.png",
hovertext = true,
text = "text",
execute = function()
end
submenu = {
active = false,
}
}
}
}
Last updated