Society Banking Setup
ARS VVS Guns V2 uses society accounts to deposit money from weapon sales. When a player purchases a weapon, the payment goes directly to the shop’s society bank account.
This guide explains how to set up the society account depending on which banking system your server uses.
How Society Detection Works
Section titled “How Society Detection Works”The script automatically detects your banking system in this priority order:
- okokBanking - Auto-detected (highest priority)
- ars_banking - Auto-detected
- qb-banking - Used when
Config.SocietyInBank = true - qb-management - Used when
Config.SocietyInBank = false
If okokBanking or ars_banking is running on your server, the script uses it automatically regardless of Config.SocietyInBank.
Common Issue: Old vs New QBCore
Section titled “Common Issue: Old vs New QBCore”Many QBCore servers run into issues because QBCore changed how society accounts work:
| QBCore Version | Society System | Config Setting |
|---|---|---|
| Old QBCore | qb-management handles society accounts | Config.SocietyInBank = false |
| New QBCore | qb-banking handles society accounts | Config.SocietyInBank = true |
If you are unsure which version you have:
- Check if you have
qb-bankingin your resources folder - Check if your
qb-managementhas society-related exports (GetAccount,AddMoney,RemoveMoney) - If
qb-bankingexists as a separate resource, you likely have the newer QBCore setup
Setup by Banking System
Section titled “Setup by Banking System”qb-management (Old QBCore)
Section titled “qb-management (Old QBCore)”This is the default society system in older QBCore builds where society accounts are managed through qb-management.
Setup:
-
Open
ars_vvsguns_v2/config.luaand set:Config.SocietyInBank = false -
Ensure
qb-managementis running in yourserver.cfg -
The boss menu location must be added to qb-management (already covered in QBCore Installation Step 3)
Exports used:
exports['qb-management']:GetAccount(job)exports['qb-management']:AddMoney(job, amount)exports['qb-management']:RemoveMoney(job, amount)No additional database tables or configuration needed beyond the standard qb-management setup.
qb-banking (New QBCore)
Section titled “qb-banking (New QBCore)”Newer QBCore builds moved society accounts to qb-banking. This is a separate resource that handles banking with society support.
Setup:
-
Open
ars_vvsguns_v2/config.luaand set:Config.SocietyInBank = true -
Ensure
qb-bankingis running in yourserver.cfg -
The society account for
vvsgundealermust exist in qb-banking’s database
Exports used:
exports['qb-banking']:GetAccountBalance(job)exports['qb-banking']:AddMoney(job, amount)exports['qb-banking']:RemoveMoney(job, amount)If money is not depositing: Check that the job name vvsgundealer matches exactly in your qb-banking society accounts table.
okokBanking / okokBankingV2
Section titled “okokBanking / okokBankingV2”okokBanking is a popular third-party banking system that supports society accounts. It is auto-detected when the resource is running.
Setup:
-
Install okokBanking following its own installation guide
-
Open
okokBanking/config.lua(orokokBankingV2/config.lua) and add thevvsgundealerjob toConfig.Societies:Config.Societies = {["police"] = {4},["ambulance"] = {3, 4, 5},["vvsgundealer"] = {3}, -- Grade 3 (Owner) has full access}The number
{3}means grade 3 (Owner) has full access to the society bank account. Add other grades if needed:["vvsgundealer"] = {2, 3}, -- Grades 2 (Manager) and 3 (Owner) have access -
In okokBanking config, verify the society resource is set correctly:
Config.SocietyResource = "okokBanking" -
Run the okokBanking SQL queries for the
okokbanking_societiestable (included in okokBanking’s installation SQL) -
No changes needed in
ars_vvsguns_v2/config.lua- okokBanking is auto-detected
Exports used:
exports['okokBanking']:GetAccount(society)exports['okokBanking']:AddMoney(society, amount)exports['okokBanking']:RemoveMoney(society, amount)Verification: After setup, restart your server and check that the vvsgundealer society account appears in okokBanking’s banking UI.
Note: If okokBanking is running, it takes priority over qb-banking and qb-management regardless of
Config.SocietyInBank.
ars_banking
Section titled “ars_banking”ars_banking is another banking system that supports society accounts. It is auto-detected when the resource is running.
Setup:
-
Install ars_banking following its own installation guide
-
Ensure the
vvsgundealersociety account is registered in ars_banking -
No changes needed in
ars_vvsguns_v2/config.lua- ars_banking is auto-detected
Exports used:
exports['ars_banking']:GetAccount(job)exports['ars_banking']:AddMoney(job, amount)exports['ars_banking']:RemoveMoney(job, amount)Note: ars_banking is checked after okokBanking but before qb-banking in priority.
Other Banking Systems
Section titled “Other Banking Systems”The following banking systems also support society accounts in QBCore but are not yet built into this script. If you use one of these, you will need to modify server/utils.lua to add support:
| Banking System | Resource Name | Exports |
|---|---|---|
| Renewed-Banking | Renewed-Banking | getAccountMoney(society), addAccountMoney(society, amount), removeAccountMoney(society, amount) |
| fd_banking | fd_banking | GetAccount(society), AddMoney(society, amount), AddGangMoney(society, amount) |
| Tgiann-bank | Tgiann-bank | Varies - check Tgiann docs |
| tgg-banking | tgg-banking | AddSocietyMoney(society, amount) |
| kartik-banking | kartik-banking | AddAccountMoney(society, amount, reason) |
| p_banking | p_banking | addAccountMoney(society, amount, reason) |
To add support for one of these, open server/utils.lua and add the resource check in the GetSocietyMoney, AddSocietyMoney, and RemoveSocietyMoney functions, following the existing pattern:
-- Add this in GetSocietyMoney, AddSocietyMoney, and RemoveSocietyMoney:if GetResourceState('Renewed-Banking') == 'started' then return exports['Renewed-Banking']:getAccountMoney(job)endESX Framework (esx_society)
Section titled “ESX Framework (esx_society)”ESX uses esx_society and esx_addonaccount for society accounts. This is handled automatically when Config.Framework = 'esx'.
Setup:
-
Ensure
esx_societyis running -
The script automatically registers society accounts on startup using:
TriggerEvent('esx_society:registerSociety', job, job, 'society_'..job, 'society_'..job, 'society_'..job, {type = 'private'}) -
No additional configuration needed for ESX
Troubleshooting
Section titled “Troubleshooting”Money Not Depositing to Society Account
Section titled “Money Not Depositing to Society Account”- Check which banking system is running on your server
- Verify the correct
Config.SocietyInBanksetting for qb-banking vs qb-management - If using okokBanking, verify the job is added to
Config.Societies - Check server console for any export errors
- Verify the job name matches exactly between
ars_vvsguns_v2config and your banking system
”Society money not found” Error
Section titled “”Society money not found” Error”- QB: The job
vvsgundealerdoes not have a society account in your banking system - Fix: Add the job to your banking system’s society configuration (see setup guides above)
okokBanking Not Auto-Detected
Section titled “okokBanking Not Auto-Detected”- Verify the resource name is exactly
okokBanking(case-sensitive) - Check that okokBanking is started before
ars_vvsguns_v2in yourserver.cfg - Ensure okokBanking SQL has been run and
okokbanking_societiestable exists
Boss Menu Shows $0 Despite Sales
Section titled “Boss Menu Shows $0 Despite Sales”- The boss menu reads from a different source than the society account
- Verify you are checking the correct bank account (society account, not personal)
- For qb-management: the boss menu reads from qb-management’s account
- For qb-banking/okokBanking: check the society banking tab
Switching Between Banking Systems
Section titled “Switching Between Banking Systems”If you are switching from one banking system to another:
- Stop your server
- Update
Config.SocietyInBankinars_vvsguns_v2/config.luaif needed - Update your banking system’s society configuration
- Restart your server
Important: okokBanking and ars_banking are auto-detected and take priority. If you have one of these running but want to use qb-banking instead, you must stop/remove the other banking resource.
Quick Reference Table
Section titled “Quick Reference Table”| Banking System | Auto-Detected | Config Required | ESX Support |
|---|---|---|---|
| qb-management | No | Config.SocietyInBank = false | No |
| qb-banking | No | Config.SocietyInBank = true | No |
| okokBanking | Yes | Add job to Config.Societies | Yes |
| ars_banking | Yes | None | No |
| Renewed-Banking | No | Manual code edit | No |
| fd_banking | No | Manual code edit | No |
| esx_society | Yes | None (ESX only) | Yes |
Note: This guide is written by a third party. If you find any incorrect or outdated information, please contact us on Discord so we can update it for you.