Server-Side

Server Exports

Below are all the useful exports that you can use in other resources, be sure to read their descriptions.


getCompanyMoney

With this export, you can see how much money is in the workshop safe

-- @param {tuningId: string}: tuningId is the key of the tuning table
local amount = exports["vms_tuning"]:getCompanyMoney(tuningId)

addCompanyMoney

With this export you can add money to the workshop safe

Remember, when using this export, after it is executed, you need to call an event that updates the management menu for each player:

TriggerClientEvent("vms_tuning:updateBusiness", -1, tuningId, nil, {sub = "balance", value = exports['vms_tuning']:getCompanyMoney(tuningId)})
-- @param {tuningId: string}: tuningId is the key of the tuning table
-- @param {amount: number}: the amount to be added to the workshop safe
exports["vms_tuning"]:removeCompanyMoney(tuningId, amount)

removeCompanyMoney

With this export you can remove money from the workshop safe

Remember, when using this export, after it is executed, you need to call an event that updates the management menu for each player:

TriggerClientEvent("vms_tuning:updateBusiness", -1, tuningId, nil, {sub = "balance", value = exports['vms_tuning']:getCompanyMoney(tuningId)})
-- @param {tuningId: string}: tuningId is the key of the tuning table
-- @param {amount: number}: the amount to be removed from the workshop safe
exports["vms_tuning"]:removeCompanyMoney(tuningId, amount)

Last updated