Below are all the useful exports that you can use in other resources, be sure to read their descriptions.
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)
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 endlocal 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 pointslocal penaltyPoints = exports['vms_cityhall']:getPenaltyPoints(src)
addPenaltyPoints
Add penalty points to the player.
---@param {src: number}: player id---@param {count: number}: number of penalty pointsexports['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)
Explanation
Explanation of removeFromList
The script automatically removes after the time specified in Config.RemovePenaltyPointsAfter penalty points from the time they were given to the citizen, you set this parameter to true, then the points will be subtracted from the list which will result in the correct removal of penalty points automatically in the future.
resetPenaltyPoints
Resets the penalty points and clears the player's list of penalty points.
---@param {src: number}: player idexports['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)
Explanation
Return value is a table that has information about all received active resumes to the company, below is an explanation of the parameters and an example.
Parameters:
sender: string
sender_name: string
job: string
date: number
informations: table
phone_number: string
photo: string
about_me: string
work_experience: string
skills: table
interests: table
Example:
{ ['char1:11000000a0aa00a'] = { sender ="char1:11000000a0aa00a",sender_name"Character Name", job ="mechanic", date =1729737106, informations = { phone_number ="123-5678", photo ="data:image/png;base64,iVBO...", about_me ="My example of about me!", work_experience ="My example of work experience!", skills = {"👥 Teamwork","✊ Leadership"}, interests = {"📸 Photography","🎮 Video games"}, } },}
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)
Explanation
Return value is a table that has information about all taxes from the company, below is an explanation of the parameters and an example.
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 taxexports['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 taxexports['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 amountexports['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 taxesexports['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.
---@param {amount: number}---@param {addToTotalEarned: boolean}: are they to be added to the Total Earned sectionexports['vms_cityhall']:addCompanyMoney(amount, addToTotalEarned)