Server Exports

Server Exports

WithdrawMoney

Withdraw money from a society account.

---@param jobName string Registered job or gang name, e.g. 'police' / 'ballas'
---@param amount number Amount of money to withdraw
---@return boolean success True if withdrawal succeeded, false otherwise
exports['g-bossmenu']:WithdrawMoney(jobName, amount)

DepositMoney

Deposit money into a society account.

---@param jobName string Registered job or gang name, e.g. 'police' / 'ballas'
---@param amount number Amount of money to deposit
---@return boolean success True if deposit succeeded, false otherwise
exports['g-bossmenu']:DepositMoney(jobName, amount)

GetSocietyMoney

Get society account balance.

---@param jobName string Registered job or gang name, e.g. 'police' / 'ballas'
---@return number balance Current balance of the society account
exports['g-bossmenu']:GetSocietyMoney(jobName)

CreateTransactionLog

Create a new transaction log entry for a society.

---@param data table Transaction data object
---| society_name string Name of the society (e.g. 'police')
---| type string Type of transaction ('deposit' / 'withdraw')
---| amount number Transaction amount
---| identifier string Player identifier
---| performed_by string Player name or label
---| notes? string Optional note for the transaction
---@return boolean success True if log created successfully
exports['g-bossmenu']:CreateTransactionLog(data)
Example
-- Example:
-- Create a deposit transaction record for the police society
exports['g-bossmenu']:CreateTransactionLog({
    society_name = 'police',
    type = 'deposit',
    amount = 1500,
    identifier = 'steam:110000112345678',
    performed_by = 'John Doe',
    notes = 'Fine payments deposit'
})

GetTotalReportsByJob

Get total number of player reports for a specific job.

---@param job string Registered job name, e.g. 'police' / 'ambulance'
---@return number total Total number of reports for the job
exports['g-bossmenu']:GetTotalReportsByJob(job)

GetAllReportsByJob

Get all player reports under a specific job.

---@param job string Registered job name, e.g. 'police' / 'ambulance'
---@return table reports List of player report records
exports['g-bossmenu']:GetAllReportsByJob(job)

GetPlayerReportById

Get a player report by its unique ID.

---@param id number Report ID
---@return table|nil report Player report details (or nil if not found)
exports['g-bossmenu']:GetPlayerReportById(id)

CreatePlayerReport

Create a new player report entry.

---@param data table Report data
---| identifier | citizenid string Player identifier (e.g. 'steam:110000112345678' or JKH20163)
---| name string Reporter name
---| job string Job name, e.g. 'police'
---| grade_label string Reporter’s grade or rank
---| report_text string Main report content or statement
---| status? string Optional report status ('pending' by default)
---| boss_notes? string Optional supervisor notes
---| evidence? string[] Optional list of evidence (URLs, images, clips)
---@return table result { success: boolean, id?: number, message: string }
exports['g-bossmenu']:CreatePlayerReport(data)
Example
-- Example:
-- Create a misconduct report
local result = exports['g-bossmenu']:CreatePlayerReport({
    identifier = 'steam:110000112345678',
    name = 'John Doe',
    job = 'police',
    grade_label = 'Sergeant',
    report_text = 'Filed report for misconduct during patrol operation.',
    evidence = {
        'bodycam_footage_2025-11-08.mp4',
        'screenshot_incident.png'
    },
    boss_notes = 'Review by senior staff required.'
})

if result.success then
    print(('Report created successfully (ID: %d)'):format(result.id))
else
    print(('Failed to create report: %s'):format(result.message))
end

DeletePlayerReport

Delete a player report by ID.

---@param id number Unique report ID
---@return boolean success True if the report was successfully deleted
exports['g-bossmenu']:DeletePlayerReport(id)

GetReportsByIdentifier

Get all reports submitted by a specific player.

---@param identifier | citizenid string Player identifier or citizen id (e.g. 'steam:110000112345678' or JKH20163)
---@return table reports List of player reports
exports['g-bossmenu']:GetReportsByIdentifier(identifier)

GetTotalEmployeeLeaves

Get total number of employee leave requests for a specific job.

---@param job string Registered job name, e.g. 'police' / 'ambulance'
---@return number total Total number of leave requests for that job
exports['g-bossmenu']:GetTotalEmployeeLeaves(job)

GetEmployeeLeaveById

Get a specific employee leave request by ID.

---@param id string Leave request ID
---@return table|nil leave Detailed leave record, or nil if not found
exports['g-bossmenu']:GetEmployeeLeaveById(id)

GetLeavesByIdentifier

Get all leave requests submitted by a specific player.

---@param identifier | citizenid  string Player identifier (e.g. 'steam:110000112345678' or JKH20163)
---@return table leaves List of all leave requests submitted by that player
exports['g-bossmenu']:GetLeavesByIdentifier(identifier)

CreateEmployeeLeave

Create a new employee leave request.

---@param data table Leave request data
---| identifier | citizenid string Player identifier (e.g. 'steam:110000112345678' or JKH20163)
---| name string Player’s display name
---| job string Job name, e.g. 'police'
---| grade_label string Player’s rank or grade label
---| leave_type string Type of leave (e.g. 'vacation', 'sick', 'emergency')
---| start_date string Start date of leave (format: 'YYYY-MM-DD')
---| end_date string End date of leave (format: 'YYYY-MM-DD')
---| total_days number Total number of days for the leave
---| reason string Reason for requesting leave
---@return table result { success: boolean, id?: number, message: string }
exports['g-bossmenu']:CreateEmployeeLeave(data)
Example
-- Submit a new leave request
local result = exports['g-bossmenu']:CreateEmployeeLeave({
    identifier = 'steam:110000112345678',
    name = 'John Doe',
    job = 'police',
    grade_label = 'Sergeant',
    leave_type = 'vacation',
    start_date = '2025-11-10',
    end_date = '2025-11-15',
    total_days = 5,
    reason = 'Family vacation trip'
})

DeleteEmployeeLeave

Delete a leave request by ID.

---@param id string Leave request ID
---@return boolean success True if the leave request was deleted successfully
exports['g-bossmenu']:DeleteEmployeeLeave(id)

GetAllJobVehicles

Get all vehicles registered under a specific job.

---@param job string Registered job name, e.g. 'police' / 'mechanic'
---@return table vehicles List of vehicles belonging to the job
exports['g-bossmenu']:GetAllJobVehicles(job)

GetPlayerJobVehicles

Get all vehicles owned by a specific player within a job.

---@param identifier | citizenid string Player identifier (e.g. 'steam:110000112345678' or JKH20163)
---@param job string Registered job name, e.g. 'police' / 'ambulance'
---@return table vehicles List of player-owned job vehicles
exports['g-bossmenu']:GetPlayerJobVehicles(identifier, job)

AddJobVehicle

Add a new job vehicle for a player.

---@param identifier | citizenid string Player identifier (e.g. 'steam:110000112345678' or JKH20163)
---@param job string Registered job name, e.g. 'police'
---@param vehPlate string Vehicle plate (unique)
---@param grade number Player grade or rank
---@param vehicle_code string Vehicle model code (e.g. 'police2')
---@param vehicle_label string Vehicle display name (e.g. 'Police Cruiser')
exports['g-bossmenu']:AddJobVehicle(identifier, job, vehPlate, grade, vehicle_code, vehicle_label)
Example
-- Add a new vehicle to police job
exports['g-bossmenu']:AddJobVehicle('steam:110000112345678', 'police', 'POL123', 3, 'police3', 'Interceptor')

RemoveJobVehicle

Remove a player’s job vehicle by its plate.

---@param vehPlate string Vehicle plate to remove
exports['g-bossmenu']:RemoveJobVehicle(vehPlate)

GetJobVehicleByPlate

Get job vehicle details by plate

---@param vehPlate string Vehicle plate to search for
---@return table vehicle Vehicle information table or empty if not found
exports['g-bossmenu']:GetJobVehicleByPlate(vehPlate)

GetTotalJobApplications

Get total number of job applications for a specific job

---@param job string Registered job name, e.g. 'police' / 'ambulance'
---@return number total Total number of job applications
exports['g-bossmenu']:GetTotalJobApplications(job)

GetAllJobApplications

Get all job applications for a specific job

---@param job string Registered job name, e.g. 'police' / 'ambulance'
---@return table applications List of job applications for the given job
exports['g-bossmenu']:GetAllJobApplications(job)

GetJobApplicationById

Get a specific job application by ID

---@param id number Job application ID
---@return table|nil application Job application details or nil if not found
exports['g-bossmenu']:GetJobApplicationById(id)

CreateJobApplication

Create a new job application

---@param data table Application data
---| identifier | citizenid string Player identifier (e.g. 'steam:110000112345678' or JKH20163)
---| name string Applicant name
---| job string Job name, e.g. 'police'
---| application_data table Custom form data or structured info
---| status? string Optional status (default: 'pending')
---| notes? string Optional notes from applicant or system
---@return table result { success: boolean, id?: number, message: string }
exports['g-bossmenu']:CreateJobApplication(data)
Example
-- Create a new job application for the police department
local result = exports['g-bossmenu']:CreateJobApplication({
    identifier = 'steam:110000112345678',
    name = 'John Doe',
    job = 'police',
    application_data = {
        reason = 'I want to protect and serve the citizens of Los Santos.',
        experience = 'Worked as a security officer for 2 years.',
        -- can add many as you want
    }
})

GetApplicationsByIdentifier

Get all applications submitted by a specific player

---@param identifier | citizenid string Player identifier (e.g. 'char1:110000112345678' or 'JKH20163')
---@return table applications List of job applications submitted by the player
exports['g-bossmenu']:GetApplicationsByIdentifier(identifier)

Last updated