Exports

  • Here are some exports you can use to get/add/remove money from society, all exports are server side.

  • Original code can be found in av_laptop/server/exports.lua

Get Society

-- returns number or false if the society does not exist
local society = "police"
local money = exports['av_laptop']:getSociety(society)
if society then
    print(money)
else
    print(society.." doesn't exists")
end

Add Society Money

local src = source -- optional
local society = "police" -- the society name (job)
local amount = 2000 -- amount to deposit
local name = "AV Scripts" -- player name (for business app > bank logs), optional
local description = "Sold 2x chicken nuggets" -- for business app > bank logs, optional

exports['av_laptop']:addSociety(src,society,amount,name,description)

Remove Society Money

local src = source -- optional
local society = "police" -- society name (job)
local amount = 1000 -- amount to remove
local name = "AV Scripts" -- player name, for business app > bank logs, optional
local description = "Ingredients" -- for business app > bank logs, optional

exports['av_laptop']:removeSociety(src,society,amount,name,description)

Add Income for Today's Income/Overview chart

local job = "police"
local money = 5000
local addOrder = true -- or false, add transaction to Today's Overview graph
exports['av_business']:addIncome(job,money,addOrder)

Last updated