LogoLogo
Discord
  • Project Sponsors
    • ✍️JetBrains
    • 📚GitBook
    • 🗃️Pleb Masters: Forge
    • 🎥KakarotDevs
  • Guides
    • 🪟Windows Installation
    • 🐧Linux Installation
    • 🔓Setting Permissions
    • 🚀Script Optimization
    • 📑Miscellaneous Guides
    • 📝Visual Studio Code
    • 🔗Useful Links
  • QB-Core
    • Core Object
    • 📊Player Data
    • 📜Shared
    • ↗️Shared Exports
    • 💬DrawText
    • 🎮Client Event Reference
    • 🎮Client Function Reference
    • 🖥️Server Event Reference
    • 🖥️Server Function Reference
    • ❗Commands
  • QBCore Resources
    • 🔧qb-adminmenu
    • 🚑qb-ambulancejob
    • 🏨qb-apartments
    • 🏦qb-banking
    • 💰qb-bankrobbery
    • 🚌qb-busjob
    • 🏢qb-cityhall
    • 👕qb-clothing
    • 🪙qb-crypto
    • 🤿qb-diving
    • 🚪qb-doorlock
    • 💊qb-drugs
    • ⌚qb-fitbit
    • ⛽qb-fuel
    • 🚘qb-garages
    • 🚛qb-garbagejob
    • 🌭qb-hotdogjob
    • 🔫qb-houserobbery
    • 🏡qb-houses
    • ℹ️qb-hud
    • 📝qb-input
    • 🏠qb-interior
    • 🎒qb-inventory
    • 💎qb-jewelry
    • 🏁qb-lapraces
    • 🔃qb-loading
    • 👔qb-management
    • 🧑‍🔧qb-mechanicjob
    • ↖️qb-menu
    • qb-minigames
    • 🙋qb-multicharacter
    • 📰qb-newsjob
    • 🤑qb-pawnshop
    • 📱qb-phone
    • 👮qb-policejob
    • 🔐qb-prison
    • 🔄qb-radialmenu
    • 📻qb-radio
    • ♻️qb-recyclejob
    • 📋qb-scoreboard
    • 🔋qb-scrapyard
    • 🏪qb-shops
    • 📚qb-smallresources
    • 🗺️qb-spawn
    • 🔫qb-storerobbery
    • 🏎️qb-streetraces
    • 🚕qb-taxijob
    • 🛻qb-towjob
    • 👁️qb-target
    • 🚛qb-truckerjob
    • 🔫qb-truckrobbery
    • 🔑qb-vehiclekeys
    • 📄qb-vehiclesales
    • 🚗qb-vehicleshop
    • 🍇qb-vineyard
    • 🔫qb-weapons
    • 🌤️qb-weathersync
    • 🌿qb-weed
Powered by GitBook

Community

  • Discord
  • Guilded
  • Reddit

Social Media

  • YouTube
  • Facebook
  • Twitch

@ 2025 QBCore Framework

On this page
  • Introduction
  • CreatePlayerAccount
  • CreateJobAccount
  • CreateGangAccount
  • AddMoney
  • RemoveMoney
  • GetAccount
  • GetAccountBalance
  • CreateBankStatement

Was this helpful?

Edit on GitHub
  1. QBCore Resources

qb-banking

Keep your money safe and quickly access!

Introduction

  • Multiple ATM's & banks around the map to interact with

  • Handles all player interaction with bank/job/gang/shared accounts

  • ATM and bank card integration

  • Shared accounts between players

  • Auto creation of job/gang accounts on bank first open

  • Boss-only access to job/gang accounts

CreatePlayerAccount

Creates a new shared account for a player and returns where it was successful or not

exports['qb-banking']:CreatePlayerAccount(playerId, accountName, accountBalance, accountUsers)
  • playerId: number

  • accountName: string

  • accountBalance: number

  • accountUsers: table

  • returns: boolean

RegisterCommand('createPlayerAccount', function(source)
    local playerId = source
    local accountName = 'My Shared Account'
    local accountBalance = 5000
    local accountUsers = {'LCC00307', 'LCC00308'} -- list of citizenid's
    exports['qb-banking']:CreatePlayerAccount(playerId, accountName, accountBalance, json.encode(accountUsers))
end, true)

CreateJobAccount

Creates a new job type account, this is automatically done so shouldn't need this

exports['qb-banking']:CreateJobAccount(accountName, accountBalance)
  • accountName: string

  • accountBalance: number

Example:

RegisterCommand('createJobAccount', function()
    local accountName = 'police'
    local accountBalance = 10000
    exports['qb-banking']:CreateJobAccount(accountName, accountBalance)
end, true)

CreateGangAccount

Creates a new gang type account, this is automatically done so shouldn't need this

exports['qb-banking']:CreateGangAccount(accountName, accountBalance)
  • accountName: string

  • accountBalance: number

Example:

RegisterCommand('createGangAccount', function()
    local accountName = 'ballas'
    local accountBalance = 10000
    exports['qb-banking']:CreateGangAccount(accountName, accountBalance)
end, true)

AddMoney

Adds money to an account by name and returns where it was successful or not

exports['qb-banking']:AddMoney(accountName, amount, reason)
  • accountName: string

  • amount: number

  • reason: string

  • returns: boolean

RegisterCommand('addMoney', function()
    local accountName = 'police'
    local amount = 10000
    exports['qb-banking']:AddMoney(accountName, amount, 'test example')
end, true)

RemoveMoney

Removes money from an account by name and returns where it was successful or not

exports['qb-banking']:RemoveMoney(accountName, amount, reason)
  • accountName: string

  • amount: number

  • reason: string

  • returns: boolean

RegisterCommand('removeMoney', function()
    local accountName = 'police'
    local amount = 10000
    exports['qb-banking']:RemoveMoney(accountName, amount, 'test example')
end, true)

GetAccount

Returns all the information for the specified account by name

exports['qb-banking']:GetAccount(accountName)
  • accountName: string

  • returns: table | nil

RegisterCommand('getAccount', function()
    local accountName = 'police'
    local accountInfo = exports['qb-banking']:GetAccount(accountName)
    if not accountInfo then print('Account '..accountName..' does not exist') return end
    for _, info in pairs(accountInfo) do
        print('Account Name: '..info.account_name)
        print('Account Balance: '..info.account_balance)
        print('Account Type: '..info.account_type)
    end
end, true)

GetAccountBalance

Returns just the balance of the specified account by name

exports['qb-banking']:GetAccountBalance(accountName)
  • accountName: string

  • returns: number

RegisterCommand('getBalance', function()
    local accountName = 'police'
    local balance = exports['qb-banking']:GetAccountBalance(accountName)
    print('Account: '..accountName..' Balance: '..balance)
end, true)

CreateBankStatement

This will create a statement for a specified account and returns where it was successful or not

exports['qb-banking']:CreateBankStatement(playerId, account, amount, reason, statementType, accountType)
  • playerId: number

  • account: string

  • amount: number

  • reason: string

  • statementType: string

  • accountType: string

  • returns: boolean

RegisterCommand('createBankStatement', function(source)
    local playerId = source
    local account = 'My Shared Account'
    local amount = 5000
    local reason = 'Removed money'
    local statementType = 'withdraw' -- deposit
    local accountType = 'shared' -- 'player', 'job', 'gang'
    local statementCreated = exports['qb-banking']:CreateBankStatement(playerId, account, amount, reason, statementType, accountType)
    if statementCreated then print('Statement Created') return end
    print('Error creating statement')
end, true)
Previousqb-apartmentsNextqb-bankrobbery

Last updated 1 year ago

Was this helpful?

🏦