Yecoyz.
Docs/yecoyz_bossmenu

Access

Who can use the boss menu and which parts of it.

Get yecoyz_bossmenu

Bosses

Bosses get the whole menu.

lua
Config.Access.BossGrades = { 'boss' }
  • On ESX these are grade names. A number means that grade and higher, for example { 4 }.
  • On QBCore and Qbox the job's own isboss flag counts too.

Single employees

A boss can give any employee parts of the menu with the Access button on the Employees page. Someone with only hire can hire people and nothing else, and someone with vehicles can buy work vehicles.

Nobody can give access they don't have themselves.

Ranks

Ranks can get access without giving it one person at a time. The number is the lowest rank that gets it:

lua
Config.Access.GradeDefaults = {
    police = {
        [3] = { 'dashboard', 'employees', 'hire', 'duty' },
    },
}

Permissions

Permission Allows
dashboard The dashboard page
employees The employees list. Needed for everything that works on a person
hire Hiring players near the computer
fire Firing employees
promote Changing an employee's rank
grades Creating, renaming, reordering and deleting ranks
salaries Changing rank salaries and personal salaries
bonuses Paying bonuses
vehicles Buying work vehicles
items Buying work items
economy The economy page
deposit / withdraw Moving money in and out of the company account
duty The duty page and shift management
logs The activity log
access Giving other employees access

A permission only exists while its feature is on in Config.Features.

Rank rules

lua
Config.Access.Hierarchy = true

When on, nobody can manage an employee with the same or a higher rank than their own, and nobody can hire or promote someone to their own rank or higher. Bosses are not limited.

Jobs

lua
Config.Access.Jobs = {}

Only these jobs can have a boss menu. Leave it empty for every job.

Note

Every action is checked again on the server, so a player can't get around the access rules by changing the menu.

Setting it up in game

Open /bossmenucreator, click the job on the left and go to the Access tab.

  • Pages: the parts of the boss menu the job can use. A page turned off is gone for everyone in that job, bosses included, even when it is on in Config.Features. Pages that need another one (Deposit needs the company account) go off with it.
  • Ranks: what each rank gets on its own. Click a permission to give it to or take it from that rank. Boss ranks always have everything. Permissions given to single employees on the menu's Access page still count on top.

Click Save to save both. Once the ranks of a job are saved in game, they replace Config.Access.GradeDefaults for that job. Reset to config uses the config again, and Turn all on turns every page back on. When ranks are moved in the boss menu, their permissions move with them.