Server Exports
updatePaychecks
With this export you can add or remove money in the paychecks for a specific player, they will be collectible in the cityhall menu.
---@param {src: number}: player id
---@param {amount: number}: The monetary amount to be adjusted in the player's paycheck
---@param {action: string}: Specifies the action to take — either 'add' to increase or 'remove' to decrease the paycheck amount.
exports['vms_cityhall']:updatePaychecks(src, amount, action)
getHealthInsurance
Get information about the player's health insurance.
---@param {src: number}: player id
---@return {isInsured: boolean}
---@return {timestamp: number}: time until which it is insured
local isInsured, timestamp = exports['vms_cityhall']:getHealthInsurance(src)
addHealthInsurance
Add health insurance time.
---@param {src: number}: player id
---@param {daysCount: number}
exports['vms_cityhall']:addHealthInsurance(src, daysCount)
getVehicleInsurance
Function checks the insurance status of a vehicle using its Vehicle Identification Number (VIN) or license plate. It returns a boolean indicating whether the vehicle is insured, and if insured, it also provides the start and expiry dates of the insurance policy.
---@param {value: string}: VIN Number or License Plate
---@return {insured: boolean, startDate: string | nil, expiryDate: string | nil}
local insured, startDate, expiryDate = exports['vms_cityhall']:getVehicleInsurance(value)
addVehicleInsurance
Allows you to assign a vehicle's insurance policy based on its VIN number or license plate for a specific number of days.
---@param {days: number}:
---@param {value: string}: VIN Number or License Plate
---@return {insured: boolean, startDate: string | nil, expiryDate: string | nil}
exports['vms_cityhall']:addVehicleInsurance(days, value)
giveBill
Using the above export, you can assign a fine or invoice to a player, without the required issuance by another player or acceptance by the receiving player, an example application, for example, for speed cameras.
---@param {src: number}: player id
---@param {type: string}: 'ticket' / 'traffic-ticket' / 'invoice'
---@param {data: table}
---@param {giveItem: boolean}: do you want the player to receive an inventory mandate item?
---@return {fineId: number}: id of the document assigned in the database
exports['vms_cityhall']:giveBill(src, type, data, giveItem, function(fineId)
end)
suspenseLicense
Cancellation of the license and its suspension for a specified period of time, using, for example, vms_driveschoolv2, then the player will not be able to take the exam until the lockout ends.
---@param {src: number}: player id
---@param {licenseName: string}: license name like 'drive_b'
---@param {time: number}: The value given in seconds - for example, 7 * 24 * 60 * 60, then it will be 7 days of blocking the license
exports['vms_cityhall']:suspenseLicense(src, licenseName, time)
reinstateLicense
Restores the ability to take exams * It does not return previously revoked licenses to the player.
---@param {src: number}: player id
---@param {licenseName: string}: license name like 'drive_b'
exports['vms_cityhall']:reinstateLicense(src, licenseName)
isLicenseSuspended
Checking the license information, this will return information on whether the license is suspended and if it is, it will also return the end date of the suspension.
---@param {src: number}: player id
---@param {licenseName: string}: license name like 'drive_b'
---@return {isSuspended: boolean}: true or false, you can add to your driving school the ability to take the exam
---@return {suspendedTime: number or nil}: timestamp of the date when the license suspension penalty will end
local isSuspended, suspendedTime = exports['vms_cityhall']:isLicenseSuspended(src, licenseName)
getPenaltyPoints
Get information about a player's penalty points.
---@param {src: number}: player id
---@return {penaltyPoints: number}: number of penalty points
local penaltyPoints = exports['vms_cityhall']:getPenaltyPoints(src)
addPenaltyPoints
Add penalty points to the player.
---@param {src: number}: player id
---@param {count: number}: number of penalty points
exports['vms_cityhall']:addPenaltyPoints(src, count)
removePenaltyPoints
Remove penalty points for the player.
---@param {src: number}: player id
---@param {count: number}: number of penalty points
---@param {removeFromList: boolean}
exports['vms_cityhall']:removePenaltyPoints(src, count, removeFromList)
resetPenaltyPoints
Resets the penalty points and clears the player's list of penalty points.
---@param {src: number}: player id
exports['vms_cityhall']:resetPenaltyPoints(src)
setResumeAllowed
Allows or prevents citizens from sending resumes to a specific job in the Job Center section of the city hall menu.
---@param {jobName: string}: job name like 'mechanic'
---@param {isAllowed: boolean}
exports['vms_cityhall']:setResumeAllowed(jobName, isAllowed)
getJobResumes
Returns all active resumes sent by citizens for a specific job.
---@param {jobName: string}: job name like 'mechanic'
---@return {resumes: table}:
local resumes = exports['vms_cityhall']:getJobResumes(jobName)
getJobTaxes
Returns all the company's taxes, both paid and not yet paid
---@param {jobName: string}: job name like 'mechanic'
---@return {taxes: table}:
local taxes = exports['vms_cityhall']:getJobTaxes(jobName)
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)
addPlayerTaxToPay
Add a private player tax to be paid on the specified amount using the path from Config.Taxes
.
---@param {identifier: number or string}: player server id or player identifier
---@param {fromAmount: number}: the amount on which tax is to be charged
---@param {taxPath: string}: example: 'products.food'
---@param {title: string}: reason for imposing the tax
exports['vms_cityhall']:addPlayerTaxToPay(identifier, fromAmount, taxPath, title)
addPlayerCustomTaxToPay
Add a private player custom tax to be paid on the specified amount.
---@param {identifier: number or string}: player server id or player identifier
---@param {fromAmount: number}: the amount on which tax is to be charged
---@param {percentage: number}: percentage to be charged on the amount
---@param {title: string}: reason for imposing the tax
exports['vms_cityhall']:addPlayerCustomTaxToPay(identifier, fromAmount, percentage, title)
addCompanyTaxAmount
Add the company's tax to be paid on the specified amount using the path from Config.Taxes
.
---@param {job: string}: job name like 'mechanic'
---@param {fromAmount: number}: the amount on which tax is to be charged
---@param {taxPath: string}: example: 'products.food'
exports['vms_cityhall']:addCompanyTaxAmount(job, fromAmount, taxPath)
addCompanyCustomTaxAmount
Add custom company tax to be paid on the amount specified.
---@param {job: string}: job name like 'mechanic'
---@param {fromAmount: number}: the amount on which tax is to be charged
---@param {percentage: number}: percentage to be charged on the amount
exports['vms_cityhall']:addCompanyCustomTaxAmount(job, fromAmount, percentage)
addCompanyFlatTaxAmount
Add to the company the amount of tax to be paid.
---@param {job: string}: job name like 'mechanic'
---@param {amount: number}: static number that will be added to the charge in company taxes
exports['vms_cityhall']:addCompanyFlatTaxAmount(job, amount)
registerBusinessTaxAccount
Register the company as a tax business.
You don't have to use this export, you can enter the company data in the Config.TaxBusinessAccounts
which is located in vms_cityhall/config/config.taxes.lua
---@param {jobName: string}: job name like 'mechanic'
---@param {jobLabel: string}: job label like 'BennyS'
---@return {period: string}: 'MM:YYYY'
exports['vms_cityhall']:registerBusinessTaxAccount(jobName, jobLabel, function(period)
end)
getCompanyMoney
Get information about the current balance of cityhall.
---@return {amount: number}
local amount = exports['vms_cityhall']:getCompanyMoney()
addCompanyMoney
Add money to cityhall balance.
---@param {amount: number}
---@param {addToTotalEarned: boolean}: are they to be added to the Total Earned section
exports['vms_cityhall']:addCompanyMoney(amount, addToTotalEarned)
removeCompanyMoney
Take money from the balance of cityhall.
---@param {amount: number}
exports['vms_cityhall']:removeCompanyMoney(amount)
GenerateSSN
---@param {dateOfBirth: string}
---@param {gender: string or number}
local ssn = exports['vms_cityhall']:GenerateSSN(dateOfBirth, gender)
GenerateVIN
local vin = exports['vms_cityhall']:GenerateVIN()
Last updated
Was this helpful?