
π»Installation
Dependencies :
QBCore
You will need the latest version of qb-core
Extract the contents of the archive to your resources folder.
Start the resource near the top of your resources in your server.cfg.
ADDITIONAL SETUP
QB-BANKING (optinal)
if you use qb-banking, please make sure to update these two functions :
qb-banking/server.lua
local function RemoveMoney(accountName, amount, reason, skip)
if not reason then reason = 'External Withdrawal' end
local newStatement = {
amount = amount,
reason = reason,
date = os.time() * 1000,
statement_type = 'withdraw'
}
if Accounts[accountName] then
local accountToUpdate = Accounts[accountName]
accountToUpdate.account_balance = accountToUpdate.account_balance - amount
if not Statements[accountName] then Statements[accountName] = {} end
Statements[accountName][#Statements[accountName] + 1] = newStatement
MySQL.insert.await('INSERT INTO bank_statements (account_name, amount, reason, statement_type) VALUES (?, ?, ?, ?)', { accountName, amount, reason, 'withdraw' })
local updateSuccess = MySQL.update.await('UPDATE bank_accounts SET account_balance = account_balance - ? WHERE account_name = ?', { amount, accountName })
if not skip then
exports['zat-bossmenu']:AddExternalTransaction(accountName, amount, reason, 'withdraw')
end
return updateSuccess
end
return false
endlocal function AddMoney(accountName, amount, reason, skip)
if not reason then reason = 'External Deposit' end
local newStatement = {
amount = amount,
reason = reason,
date = os.time() * 1000,
statement_type = 'deposit'
}
if Accounts[accountName] then
local accountToUpdate = Accounts[accountName]
accountToUpdate.account_balance = accountToUpdate.account_balance + amount
if not Statements[accountName] then Statements[accountName] = {} end
Statements[accountName][#Statements[accountName] + 1] = newStatement
MySQL.insert.await('INSERT INTO bank_statements (account_name, amount, reason, statement_type) VALUES (?, ?, ?, ?)', { accountName, amount, reason, 'deposit' })
local updateSuccess = MySQL.update.await('UPDATE bank_accounts SET account_balance = account_balance + ? WHERE account_name = ?', { amount, accountName })
if not skip then
exports['zat-bossmenu']:AddExternalTransaction(accountName, amount, reason, 'deposit')
end
return updateSuccess
end
return false
endENSURE RESOURCES
Last updated