Yecoyz.
Docs/yecoyz_bossmenu

Configuration

Every option in the Yecoyz Boss Menu config file.

Get yecoyz_bossmenu

All options are in config.lua. Access is on the Access page, vehicles on Vehicles, items on Items and computers on Computers.

General

lua
Config.Locale = 'en'   -- a file in locales/
Config.Currency = '$'

Features

Turn off what you don't want. The page or button disappears from the menu and the server refuses it.

lua
Config.Features = {
    Dashboard = true,
    Employees = true,
    Hire = true,
    Fire = true,
    Promote = true,
    Grades = true,
    GradeSalaries = true,
    IndividualSalary = true,
    Bonuses = true,
    Access = true,
    Vehicles = true,
    Items = true,
    Economy = true,
    Deposit = true,
    Withdraw = true,
    Logs = true,
    Duty = true,
}
Feature Description
Dashboard Overview page with the company's numbers
Employees Staff list. Needed for everything that works on a person
Hire / Fire / Promote Hiring players near the computer, firing, changing ranks
Grades Creating, renaming, reordering and deleting ranks
GradeSalaries Changing the salary of a rank
IndividualSalary A personal salary for one employee
Bonuses One-time bonuses from the company account
Access Giving single employees parts of the menu
Vehicles Buying work vehicles
Items Buying work items, see Items
Economy / Deposit / Withdraw The company account page and moving money
Logs Activity log
Duty yecoyz_duty statistics and shift management, only when yecoyz_duty runs

Economy

The company account is the one yecoyz_core uses, see Config.Society in yecoyz_core.

lua
Config.Economy = {
    PlayerAccount = 'bank',   -- where deposits come from and withdrawals go: 'bank' or 'cash'
    MaxTransaction = 1000000, -- largest single deposit or withdrawal
    HistoryDays = 30,         -- transactions shown on the economy page
}

Bonuses

lua
Config.Bonuses = {
    Max = 50000,          -- largest bonus at once
    Account = 'bank',     -- where the employee gets it
    OfflinePayout = true, -- an offline employee gets it at their next login
    Cooldown = 0,         -- seconds before the same employee can get another one (0 = none)
}

Personal salaries

The framework keeps paying the rank salary. The boss menu pays the difference up to the personal salary every Interval minutes, from the company account. A personal salary can't be lower than the rank salary; give a lower rank instead.

lua
Config.IndividualSalary = {
    Interval = 7,       -- minutes: set it to your framework's paycheck interval
    Max = 10000,
    FromSociety = true, -- false = the money is created instead of taken from the company account
    OnlyOnDuty = true,  -- only pay while on duty (framework duty, or yecoyz_duty)
    Account = 'bank',
}
Tip

On ESX the paycheck interval is Config.PaycheckInterval in es_extended. Use the same number of minutes here.

Ranks

lua
Config.Grades = {
    MaxGrades = 20,   -- most ranks a job can have
    MaxSalary = 25000,
}

Rank changes are saved through yecoyz_core. On ESX they go to the job_grades table. QBCore and Qbox keep jobs in a shared file, so yecoyz_core applies the changes when the server runs and puts them back on every start.

A new rank is put right below the boss rank, so the boss always stays on top. Moving a rank up or down swaps it with the rank next to it. Everyone with either rank keeps their rank, online or offline. Boss ranks don't move and no rank can go above them.

Hiring

lua
Config.Hiring = {
    Distance = 8.0, -- metres from the computer a player has to stand to be hired
    ById = true,    -- also allow hiring by server id (the player still has to be near)
}

Duty

Used when Config.Features.Duty is on and yecoyz_duty runs.

lua
Config.Duty = {
    Resource = 'yecoyz_duty',
    AllowEdit = true,     -- change how long a shift lasted
    AllowRemove = true,   -- remove a shift
    AllowAdd = true,      -- add a shift by hand (someone forgot to clock in)
    AllowForceOff = true, -- end the shift of someone on duty now
    MaxShiftHours = 24,
}

Changes made here show as edited in yecoyz_duty too.

Computers

lua
Config.Computer = {
    ViewDistance = 12.0,  -- how close you have to be to see the screen
    SpawnDistance = 60.0, -- props are spawned within this distance
    InteractDistance = 1.6,
    Mode = 'screen',      -- 'screen' or 'fullscreen'
    Animation = { dict = 'anim@heists@prison_heiststation@cop_reactions', clip = 'cop_b_idle' },
    Models = { ... },     -- see Computers
}

Config.Creator = {
    Command = 'bossmenucreator',
    Permission = 'group.admin', -- ace, or the ESX group / QBCore permission
}

Config.Command = nil -- e.g. 'bossmenu' to open the menu with a command