Installation

All Events and Exports for msk_banking

You need msk_core! - Download it here

  1. Upload the msk_banking folder.

  2. Insert ensure msk_banking in your server.cfg

  3. Please configure the config.lua before starting the Script!

  4. Restart your Server.

The SQL will be uploaded automatically.

esx_addonaccount

Please go to esx_addonaccount/server/main.lua

If you don't have a function like the following then please redownload esx_addonaccount from ESX Github and replace all files!!!

addonaccount.lua
function AddSharedAccount(society, amount)
    if type(society) ~= 'table' or not society?.name or not society?.label then return end
    -- society.name = job_name/society_name
    -- society.label = label for the job/account
    -- amount = if the shared account should start with x amount

    -- addon account:
    local account = MySQL.insert.await('INSERT INTO `addon_account` (name, label, shared) VALUES (?, ?, ?)', {
        society.name, society.label, 1
    })
    if not account then return end

    -- if addon account inserted, insert addon account data:
    local account_data = MySQL.insert.await('INSERT INTO `addon_account_data` (account_name, money) VALUES (?, ?)', {
        society.name, (amount or 0)
    })
    if not account_data then return end
	
    -- if all data inserted successfully to sql:
    SharedAccounts[society.name] = CreateAddonAccount(society.name, nil, (amount or 0))
end

es_extended

Please go to es_extended/server/classes/player.lua line ~168. You have to see this: function self.setAccountMoney(accountName, money)

Please add the following lines as you can see at the picture if it's not already added: https://prnt.sc/qM3gulnXHqti

TriggerEvent('esx:setAccountMoney', self.source, accountName, money)
TriggerEvent('esx:addAccountMoney', self.source, accountName, money)
TriggerEvent('esx:removeAccountMoney', self.source, accountName, money)

Last updated