Client-Side

Client Exports

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 sections
exports['vms_cityhall']:openCityHall()

-- Menus that will only have one section of jobs
exports['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 = 50000
local tax = 33 -- custom value given as number

local totalAmount, taxAmount, taxPercentage = exports['vms_cityhall']:getTaxAmount(amount, tax)

---@return totalAmount: 66500.0   |  (amount + tax)
---@return taxAmount: 16500.0     |  (tax value alone)
---@return taxPercentage: 33      |  (tax percentage)

Example of tax from Config.Taxes:

local amount = 50000
local tax = 'products.food' -- By default it's 33 %

local totalAmount, taxAmount, taxPercentage = exports['vms_cityhall']:getTaxAmount(amount, tax)

---@return totalAmount: 66500.0   |  (amount + tax)
---@return taxAmount: 16500.0     |  (tax value alone)
---@return taxPercentage: 33      |  (tax percentage)

checkVIN

Check the VIN number, it will be visible on the windshield or as a notification.

exports['vms_cityhall']:checkVIN()

infoVIN

Menu to check vehicle information using VIN number

exports['vms_cityhall']:infoVIN()

hideVIN

Covering the VIN number, other players will not be able to check it until it is discovered.

exports['vms_cityhall']:hideVIN()

Last updated