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.


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.

Example usage

With VIN

With License Plate


addVehicleInsurance

Allows you to assign a vehicle's insurance policy based on its VIN number or license plate for a specific number of days.

Example usage

With VIN

With License Plate


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.

Explanation

Clarification of the values required for the data parameter for invoice:

  • data: table

    • society?: string

    • job?: string

    • jobLabel?: string

    • issuerName?: string

    • dateToPay?: number

    • percentageForSociety?: number

    • invoiceData: table

    • taxFromInvoice?: number

Clarification of the values required for the data parameter for ticket:

  • data: table

    • society?: string

    • job?: string

    • jobLabel?: string

    • issuerName?: string

    • dateToPay?: number

    • amount: number

    • percentageForSociety?: number

    • locationOfViolation?: string

    • violation?: string

    • comments?: string

Clarification of the values required for the data parameter for traffic-ticket:

  • data: table

    • society?: string

    • job?: string

    • jobLabel?: string

    • issuerName?: string

    • dateToPay?: number

    • amount: number

    • percentageForSociety?: number

    • locationOfViolation?: string

    • violation?: string

    • comments?: string

    • vehicle?: table

      • plate?: string

      • make?: string

      • model?: string

      • vin?: string

    • license?: string

    • licenseRevocation?: boolean

    • licenseSuspensionTime?: number

    • penaltyPointsCount?: number

Clarification of the values required for the data parameter for receipt:

  • data: table

    • society?: string

    • job?: string

    • jobLabel?: string

    • issuerName?: string

    • dateToPay?: number

    • percentageForSociety?: number

    • receiptData: table

    • taxFromReceipt?: number

Example of Invoice

Example of Ticket

Example of Traffic Ticket

Example of Receipt


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.


reinstateLicense

Restores the ability to take exams * It does not return previously revoked licenses to the player.


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.


getPenaltyPoints

Get information about a player's penalty points.


addPenaltyPoints

Add penalty points to the player.


removePenaltyPoints

Remove penalty points for the player.

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.


setResumeAllowed

Allows or prevents citizens from sending resumes to a specific job in the Job Center section of the city hall menu.


getJobResumes

Returns all active resumes sent by citizens for a specific job.

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:


getJobTaxes

Returns all the company's taxes, both paid and not yet paid

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.

Parameters:

  • period: string

  • job: string

  • job_label: string

  • is_paid: boolean

  • paid_date: number

  • paid_amount: number

  • amount: number

  • delayed_amount: number

  • late_fee_applied: number


Example:


getTaxAmount

Calculates tax information on the specified amount.

Explanation

Example of custom tax:


Example of tax from Config.Taxes:


addPlayerTaxToPay

Add a private player tax to be paid on the specified amount using the path from Config.Taxes.


addPlayerCustomTaxToPay

Add a private player custom tax to be paid on the specified amount.


addCompanyTaxAmount

Add the company's tax to be paid on the specified amount using the path from Config.Taxes.


addCompanyCustomTaxAmount

Add custom company tax to be paid on the amount specified.


addCompanyFlatTaxAmount

Add to the company the amount of tax to be paid.


registerBusinessTaxAccount

Register the company as a tax business.


getCompanyMoney

Get information about the current balance of cityhall.


addCompanyMoney

Add money to cityhall balance.


removeCompanyMoney

Take money from the balance of cityhall.


GenerateSSN

In the section Generate SSN for Players there is a tutorial on how to generate SSNs for current players who do not have one.

Read also section Add SSN Generation to implement in your framework the automatic generation of the SSN for players.


GenerateVIN

In the section Generate VIN for Vehicles there is a tutorial on how to generate VINs for current vehicles who do not have one.

Read also section Add VIN Generation to implement in your vehicleshop the automatic generation of the VIN.

Last updated

Was this helpful?