Exports
getPermissions(playerId,job)
Returns a table with the player permissions, every permission is a index key.
params:
playerId:
numberPlayer server ID.job:
stringThe job used to retrieve player permissionsreturns:
permissions:
tableEvery table index is a permissionlocal playerId = 1 local business = "uwucafe" local permissions = exports['av_business']:getPermissions(playerId,business) print(json.encode(permissions, {indent = true}))
pendingBills(identifier)
Returns the player pending invoices. You can use this export to prevent the user from deleting his character or blocking some other in game features.
params:
identifier:
stringThe character identifierreturns:
amount:
number|falseThe amount of pending invoices or falselocal identifier = exports['av_laptop']:getIdentifier(source) local invoices = exports['av_business']:pendingBills(identifier) if invoices then print("You have "..invoices.." pending invoices") else print("Player doesn't have any pending invoices :D") end
resetBusiness(job)
Reset the business stats, this will NOT remove any employee, it will simply wipe all data like applications, webhooks, monthly generated, etc.
params:
job:
stringThe job namereturns:
result:
booleanlocal result = exports['av_business']:resetBusiness("uwucafe") print(result)
addMoney(playerName,job,amount,description)
This will NOT remove any funds from business account, is only used for the Banking logs + Today's Income + Monthly Generated.
params:
playerName?:
string|nilName from the player triggering the action.job:
stringJob nameamount:
numberThe amount to registerdescription?:
string|nilA description that will be used for the Bank tab.local playerName = exports['av_laptop']:getName(source) local job = "uwucafe" local amount = 999 local description = "Bitcoin earnings" exports['av_business']:addMoney(playerName,job,amount,description)

removeMoney(playerName,job,amount,description)
This will NOT remove any funds from business account, is only used for the Banking logs.
params:
playerName?:
string|nilName from the player triggering the actionjob:
stringJob nameamount:
numberThe amount to registerdescription?:
string|nilA description that will be used for the Bank tab.local playerName = exports['av_laptop']:getName(source) local job = "uwucafe" local amount = 123 local description = "Hello ppl from the Docs!" exports['av_business']:removeMoney(playerName,job,amount,description)

addTransaction(job,type,count)
Use it to register a Transaction for the Chart component, read Overview Chart for more info on how the Overview Chart works.
params:
business:
stringThe job name ("police", "ambulance", "mechanic", etc....)name:
stringThe transaction name (NOT label).amount:
numberThe amount of transactions to add (1 by default)returns:
added:
booleanlocal job = "mechanic" local type = "tuning" local count = 1 local result = exports['av_business']:addTransaction(job,type,count) print(result)
addActivity(job,identifier,count)
Employee of the month is based on the number of activities completed during the month. Use this export if you have any extra activity you’d like to count toward this.
params:
job:
stringPlayer jobidentifier:
stringThe player identifiercount:
numberThe amount of points to add to player monthly activities.returns:
result:
booleanlocal job = "uwucafe" local identifier = exports['av_laptop']:getIdentifier(source) local count = 1 local added = exports['av_business']:addActivity(job,identifier,count) print(added)
getSociety(job)
Retrieves a society funds.
params:
job:
stringThe job namereturns:
money:
numberSociety fundslocal funds = exports['av_laptop']:getSociety("police") print(funds)
addSociety(playerId,job,amount,name,description)
Add funds to the society.
params:
playerId?:
number|nilServer ID from player who's triggering the exportjob:
stringThe business to add the fundsamount:
numberAmount to addname?:
string|nilPlayer name who's triggering the export, this is used in the Bank tab > Employee field.description?:
string|nilA short description for the bank logs.local playerId = 1 local job = "uwucafe" local amount = 99 local name = exports['av_laptop']:getName(playerId) local description = "Hello World" exports['av_laptop']:addSociety(playerId,job,amount,name,description)
removeSociety(playerId,job,amount,name,description)
Remove funds from society.
params:
playerId?:
number|nilServer ID from player who's triggering the exportjob:
stringThe business to remove fundsamount:
numberAmount to removename?:
string|nilPlayer name who's triggering the export, this is used in the Bank tab > Employee field.description?:
string|nilA short description for the bank logslocal playerId = 1 local job = "uwucafe" local amount = 123 local name = exports['av_laptop']:getName(playerId) local description = "Business expenses" exports['av_laptop']:removeSociety(playerId,job,amount,name,description)
Last updated