Below are all the useful exports that you can use in other resources, be sure to read their descriptions.
openCityHall
Opening the city hall menu.
---@param {restrictions: table or nil}exports['vms_cityhall']:openCityHall(restrictions)
Explanation
For example, if you want to run custom menus and a large interior City Hall, you can separate the menu into different points.
Parameters:
main: boolean
jobs: boolean
insurance: boolean
licenses: boolean
fines: boolean
taxes: boolean
Example:
-- Menu with all sectionsexports['vms_cityhall']:openCityHall()-- Menus that will only have one section of jobsexports['vms_cityhall']:openCityHall({ jobs =true,})
openClerkMenu
Opening the clerk menu.
exports['vms_cityhall']:openClerkMenu()
openBillingsMenu
Opening the company's billing menu.
exports['vms_cityhall']:openBillingsMenu()
checkHealthInsurance
Opening the check helth insurance menu.
exports['vms_cityhall']:checkHealthInsurance()
openEmptyInvoice
exports['vms_cityhall']:openEmptyInvoice()
openEmptyTicket
exports['vms_cityhall']:openEmptyTicket()
openAgreement
exports['vms_cityhall']:openAgreement()
getTaxAmount
Calculates tax information on the specified amount.
---@param {amount: number}---@param {tax: number or string}---@return{totalAmount: number}---@return{taxAmount: number}---@return{taxPercentage: number}local totalAmount, taxAmount, taxPercentage = exports['vms_cityhall']:getTaxAmount(amount, tax)
Explanation
Example of custom tax:
local amount =50000local tax =33-- custom value given as numberlocal totalAmount, taxAmount, taxPercentage = exports['vms_cityhall']:getTaxAmount(amount, tax)---@returntotalAmount: 66500.0 | (amount + tax)---@returntaxAmount: 16500.0 | (tax value alone)---@returntaxPercentage: 33 | (tax percentage)