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
Dont forget to configure the framework in line 151 - 153. If you use an custom Framework you have to edit custom_framework.lua
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.
If you use multijob, you either have to disable the job lock or add all jobs with custom menus to it.
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:
If MultiJob is active, players that dont have a job which is configured there, will see the deafult menu.
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,
}
}
}
}