Banking Scripts

This is a little guide on how to connect AV Business with a banking script, for this guide we will be using Renewed Banking but works exactly the same with any other banking script that supports exports for add/remove society money.

Society exports can be found in av_laptop/server/editable/exports.lua

Get Society Funds

  • This export returns the current funds from society, replace the function with your banking export like this:

-- Returns society money or false
function getSociety(name)
    if not name then print('[ERROR] Function getSociety received NULL as argument') return end
    return exports['Renewed-Banking']:getAccountMoney(name) -- EXAMPLE with RB
end

Add Society Funds

  • This export adds funds for society and will add logs for Business APP > Bank tab

function addSociety(src, job, amount, name, description)
    if avBusiness then -- Optional but highly recommended to keep it
        --This export adds the log for Bank tab + add income for monthly goal
        exports['av_business']:addMoney(name, job, amount, description)
        if GetInvokingResource() ~= "av_business" then
            -- This export adds the transaction for Today's Overview chart
            exports['av_business']:addIncome(job,amount,true)
        end
    end
    -- You can add your banking exports here:
    exports['Renewed-Banking']:addAccountMoney(job,amount) -- EXAMPLE with RB
end

Remove Society Funds

  • This export removes society funds.

function removeSociety(src, job, amount, name, description)
    if avBusiness then
        -- Add logs for Bank tab in Business APP
        exports['av_business']:removeMoney(name, job, amount, description)
    end
    exports['Renewed-Banking']:removeAccountMoney(job,amount) -- EXAMPLE with RB
end

Last updated