Developer Documentation
This guide provides comprehensive information for developers who want to integrate with or extend Zerio Bossmenu functionality.
Available Exports
Zerio Bossmenu provides a robust set of exports for both server-side and client-side integration.
Client Exports
Open()
Opens the boss menu interface for the player.
-- Open the boss menu
exports["zerio-bossmenu"]:Open()
Server Exports
Employee Management
GetEmployeeActiveSalary(identifier, jobName)
Retrieves the active salary for a specific employee. Returns individual salary if set, otherwise falls back to role-based salary.
Parameters:
identifier
(string): Player identifierjobName
(string): Job name
Returns: number
- Employee’s current salary
-- Get employee salary
local salary = exports["zerio-bossmenu"]:GetEmployeeActiveSalary("license:abc123", "police")
print("Employee salary: $" .. salary)
Vehicle Management
GetJobVehicles(jobName, isGang)
Retrieves all owned vehicles for a specific job or gang.
Parameters:
jobName
(string): Job nameisGang
(boolean): Whether it’s a gang (true) or job (false)
Returns: table
- Array of vehicle data
-- Get all police vehicles
local vehicles = exports["zerio-bossmenu"]:GetJobVehicles("police", false)
for _, vehicle in pairs(vehicles) do
print("Vehicle: " .. vehicle.vehicle_label .. " | Plate: " .. vehicle.plate)
end
GetJobVehiclesAtGarage(jobName, isGang, garageName)
Get all job vehicles at a specific garage location.
Parameters:
jobName
(string): Job nameisGang
(boolean): Whether it’s a ganggarageName
(string): Garage identifier
Returns: table
- Array of vehicle data
-- Get vehicles at specific garage
local vehicles = exports["zerio-bossmenu"]:GetJobVehiclesAtGarage("police", false, "police_garage")
GetVehicleByPlate(plate)
Retrieve specific vehicle information by license plate.
Parameters:
plate
(string): Vehicle license plate
Returns: table|nil
- Vehicle data or nil if not found
-- Get vehicle by plate
local vehicle = exports["zerio-bossmenu"]:GetVehicleByPlate("POLICE01")
if vehicle then
print("Vehicle found: " .. vehicle.vehicle_label)
end
GetAvailableVehiclesForJob(jobName, isGang)
Get all purchasable vehicles configured for a job.
Parameters:
jobName
(string): Job nameisGang
(boolean): Whether it’s a gang
Returns: table
- Array of available vehicles
-- Get available vehicles for purchase
local availableVehicles = exports["zerio-bossmenu"]:GetAvailableVehiclesForJob("police", false)
UpdateVehicleGarage(plate, garageName)
Update the garage location for a specific vehicle.
Parameters:
plate
(string): Vehicle license plategarageName
(string): New garage name
Returns: boolean
- Success status
-- Move vehicle to different garage
local success = exports["zerio-bossmenu"]:UpdateVehicleGarage("POLICE01", "police_garage_2")
UpdateVehicleStatus(plate, status)
Update vehicle status (for garage script integration).
Parameters:
plate
(string): Vehicle license platestatus
(string): Status (“available” or “out”)
Returns: boolean
- Success status
-- Mark vehicle as taken out
local success = exports["zerio-bossmenu"]:UpdateVehicleStatus("POLICE01", "out")
UpdateVehicleCondition(plate, engine, body, fuel)
Update vehicle condition parameters.
Parameters:
plate
(string): Vehicle license plateengine
(number): Engine health (0-100)body
(number): Body health (0-100)fuel
(number): Fuel level (0-100)
Returns: boolean
- Success status
-- Update vehicle condition
local success = exports["zerio-bossmenu"]:UpdateVehicleCondition("POLICE01", 95, 85, 75)
UpdateVehicleMods(plate, mods)
Update vehicle modifications data.
Parameters:
plate
(string): Vehicle license platemods
(table|string): Modifications data (table or JSON string)
Returns: boolean
- Success status
-- Update vehicle mods
local mods = { engine = 3, transmission = 2, armor = 4 }
local success = exports["zerio-bossmenu"]:UpdateVehicleMods("POLICE01", mods)
IsJobVehicle(plate, jobName, isGang)
Check if a vehicle belongs to a specific job.
Parameters:
plate
(string): Vehicle license platejobName
(string): Job nameisGang
(boolean): Whether it’s a gang
Returns: boolean
- Whether vehicle belongs to the job
-- Check if vehicle belongs to police
local isPoliceVehicle = exports["zerio-bossmenu"]:IsJobVehicle("POLICE01", "police", false)
GetJobVehicleCount(jobName, isGang, vehicleModel)
Get count of vehicles owned by a job.
Parameters:
jobName
(string): Job nameisGang
(boolean): Whether it’s a gangvehicleModel
(string, optional): Specific vehicle model to count
Returns: number
- Vehicle count
-- Get total police vehicles
local totalVehicles = exports["zerio-bossmenu"]:GetJobVehicleCount("police", false)
-- Get specific model count
local policeCarCount = exports["zerio-bossmenu"]:GetJobVehicleCount("police", false, "police")
GetVehiclesByStatus(status, jobName, isGang)
Get all vehicles with a specific status.
Parameters:
status
(string): Vehicle statusjobName
(string, optional): Filter by job nameisGang
(boolean, optional): Filter by gang status
Returns: table
- Array of vehicle data
-- Get all vehicles that are currently out
local outVehicles = exports["zerio-bossmenu"]:GetVehiclesByStatus("out")
-- Get police vehicles that are out
local policeOutVehicles = exports["zerio-bossmenu"]:GetVehiclesByStatus("out", "police", false)
Events
Server Events
Job/Gang Update Events
QBCore Events
These events are triggered when job/gang grades are modified:
zerio-bossmenu:server:createdJobGrade
zerio-bossmenu:client:createdJobGrade
zerio-bossmenu:server:updatedJobGrade
zerio-bossmenu:client:updatedJobGrade
zerio-bossmenu:server:deletedJobGrade
zerio-bossmenu:client:deletedJobGrade
zerio-bossmenu:server:createdGangGrade
zerio-bossmenu:client:createdGangGrade
zerio-bossmenu:server:updatedGangGrade
zerio-bossmenu:client:updatedGangGrade
zerio-bossmenu:server:deletedGangGrade
zerio-bossmenu:client:deletedGangGrade
Shared Data Events:
zerio-bossmenu:server:updatedSharedJobs
zerio-bossmenu:client:updatedSharedJobs
zerio-bossmenu:server:updatedSharedGangs
zerio-bossmenu:client:updatedSharedGangs
-- Listen for job updates
AddEventHandler("zerio-bossmenu:server:updatedSharedJobs", function(jobsData)
print("Jobs updated!")
-- Handle updated jobs data
end)
Please contact us for further information and help for your specific use case.
Integration Examples
Custom Payroll Integration
-- Custom payroll system
function ProcessCustomPayroll(playerId)
local Player = GetPlayer(playerId) -- Your framework's get player function
local jobName = GetPlayerJob(Player).name
local identifier = GetPlayerIdentifier(Player)
-- Get individual salary from bossmenu
local salary = exports["zerio-bossmenu"]:GetEmployeeActiveSalary(identifier, jobName)
if salary > 0 then
-- Pay the employee
AddMoney(Player, salary)
print("Paid employee " .. GetPlayerName(playerId) .. " $" .. salary)
end
end
Database Schema
Database Tables
For developers who need direct database access, here are all the tables used by Zerio Bossmenu:
zerio_bossmenu_transactions
Financial transaction history.
Key Fields:
plridentifier
: Player who made the transactionplrname
: Player nameamount
: Transaction amountreason
: Reason for transactionjob
: Job/gang nameis_gang
: Gang flag (0/1)date
: Timestamptype
: Transaction type (deposit/withdrawal)
zerio_bossmenu_permissions
Employee permissions and access levels.
Key Fields:
identifier
: Player identifierjob
: Job nameis_gang
: Gang flag (0/1)permission
: Permission levellast_access
: Last access timestampcreated_at
: Permission grant timestamp
zerio_bossmenu_sessions
Boss menu session tracking.
Key Fields:
identifier
: Player identifierjob
: Job nameis_gang
: Gang flag (0/1)login_time
: Session start timestamplogout_time
: Session end timestampsession_duration
: Total session time
zerio_bossmenu_activities
Detailed activity logging for all actions.
Key Fields:
identifier
: Player who performed actionplayer_name
: Player namejob
: Job/gang nameis_gang
: Gang flag (0/1)action
: Action performeddetails
: Action details (JSON)target_identifier
: Target player (if applicable)amount
: Amount involved (if applicable)timestamp
: When action occurred
zerio_bossmenu_work_sessions
Employee work session tracking (clock in/out).
Key Fields:
identifier
: Player identifierplayer_name
: Player namejob
: Job nameis_gang
: Gang flag (0/1)clock_in_time
: Work start timestampclock_out_time
: Work end timestampsession_duration
: Total work timeis_active
: Whether session is ongoing
zerio_bossmenu_hire_data
Employee hire information and individual salaries.
Key Fields:
identifier
: Player identifierjob
: Job nameis_gang
: Gang flag (0/1)notes
: Hire notessalary
: Individual salary (NULL for role-based)hire_date
: Timestamp of hirefire_date
: Timestamp of termination (NULL if active)
zerio_bossmenu_positions
Boss menu position locations and settings.
Key Fields:
job_name
: Job identifierscreen_pos
: Screen position coordinatestrigger_pos
: Interaction trigger positionmodel_name
: 3D model identifierspawn_prop
: Whether to spawn physical propis_gang
: Gang flag (0/1)
zerio_bossmenu_models
3D model configuration data.
Key Fields:
model_name
: Model identifieroffset
: Position offset coordinatesscale
: Model scale valuesrotation
: Model rotation valuescamera_offset
: Camera position offsetcamera_fov
: Camera field of viewcamera_rotation_offset
: Camera rotation offset
zerio_bossmenu_logs
Comprehensive system and activity logging.
Key Fields:
timestamp
: When action occurredaction_type
: Type of action performedaction_category
: Category of actionuser_identifier
: Who performed the actionuser_name
: User display namejob_name
: Related jobis_gang
: Gang flag (0/1)action_details
: JSON details of the actionseverity
: Log severity level (LOW/MEDIUM/HIGH/CRITICAL)ip_address
: User IP addressuser_agent
: User agent string
zerio_bossmenu_available_items
Items available for purchase by each job.
Key Fields:
job_name
: Job identifieris_gang
: Gang flag (0/1)item_name
: Item spawn nameprice
: Item pricecategory
: Item categoryis_enabled
: Whether item is availablecreated_at
,updated_at
: Timestamps
zerio_bossmenu_ordered_items
Item order tracking and history.
Key Fields:
job_name
: Job that placed orderis_gang
: Gang flag (0/1)ordered_by_identifier
: Who placed the orderordered_by_name
: Player nameitem_name
: Item orderedquantity
: Amount orderedprice_per_item
: Individual item pricetotal_cost
: Total order coststatus
: Order status (pending/delivered/cancelled)order_date
: When order was placeddelivery_date
: When order was delivered
zerio_bossmenu_available_vehicles
Vehicles available for purchase by each job.
Key Fields:
job_name
: Job identifieris_gang
: Gang flag (0/1)vehicle_model
: Vehicle spawn namevehicle_label
: Display nameprice
: Purchase pricecategory
: Vehicle categorydescription
: Vehicle descriptionis_enabled
: Whether available for purchase
zerio_bossmenu_owned_vehicles
Job/gang owned vehicle fleet management.
Key Fields:
job_name
: Job identifieris_gang
: Gang flag (0/1)vehicle_model
: Vehicle spawn namevehicle_label
: Display nameplate
: Vehicle license plategarage_name
: Current garage locationfuel
,engine
,body
: Condition valuesmods
: Vehicle modifications (JSON)status
: Vehicle status (available/out)purchased_by_identifier
: Who purchased vehiclepurchase_price
: Original purchase pricepurchase_date
: When purchasedlast_used
: Last usage timestampminimum_grade
: Minimum grade to access
zerio_bossmenu_ordered_vehicles
Vehicle order tracking and delivery.
Key Fields:
job_name
: Job that placed orderis_gang
: Gang flag (0/1)ordered_by_identifier
: Who placed the orderordered_by_name
: Player namevehicle_model
: Vehicle orderedvehicle_label
: Vehicle display nameprice
: Order pricegarage_name
: Delivery garageplate
: Generated license platestatus
: Order status (pending/delivered/cancelled)order_date
: When order was placeddelivery_date
: When vehicle was delivered
Direct Database Access: While direct database access is possible, it’s recommended to use the provided exports whenever possible to ensure data consistency and proper event triggering.
Custom Banking Integration
To add support for your custom banking system:
- Edit
server/functions.lua
- Add your banking logic to these functions:
GetJobMoney(name, isGang)
AddJobMoney(name, amount, isGang, reason)
RemoveJobMoney(name, amount, isGang, reason)
-- Example custom banking integration
function GetJobMoney(name, isGang)
-- Add your banking logic here
local money = exports["my-banking"]:GetAccountBalance(name)
return money or 0
end
function AddJobMoney(name, amount, isGang, reason)
-- Add your banking logic here
return exports["my-banking"]:AddMoney(name, amount, reason or "Boss menu transaction")
end
function RemoveJobMoney(name, amount, isGang, reason)
-- Add your banking logic here
return exports["my-banking"]:RemoveMoney(name, amount, reason or "Boss menu transaction")
end
Need Help? Join our Discord community for developer support and to share your integrations with the community.