Server Exports

circle-info

Here you will find the list of usable exports for Car Sale Job, you can use them if you have basic or advanced programming knowledge, we do not recommend using these if you do not have such knowledge.

circle-exclamation

Get Account

Use following export to get some company account data.

exports['p_carsale']:getAccount(jobName)
  • jobName: string

    • Existing job name of some dealership

Return:

  • account: table


Account Data

You can use some function from list below

newContract

local account = exports['p_carsale']:getAccount('dealership')
account.newContract(contractData)
  • contractData: table

    • seller: string

    • buyer: string

    • model: string

    • price: string

    • engine?: number

    • plate: string

    • transmission?: number

    • suspension?: number

    • brakes?: number

    • turbo?: boolean


getContracts

Return:

  • contracts: table


getBalance

Return:

  • balance: number


saveMoney

Save company money manually [It's already saving after using addMoney or removeMoney]


addMoney

Add some amount of money to company account

Return:

  • success: boolean


removeMoney

Remove some amount of money from company account

Return:

  • success: boolean


getStats

Use this if you want to fetch company total income and sold vehicles

Return:

  • stats: table

    • soldVehicles: number

    • income: number


updateStat

Use this if you want to update some statistic manually

circle-exclamation

Return:

  • success: boolean


Last updated