> For the complete documentation index, see [llms.txt](https://wiki.qfdevelopers.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.qfdevelopers.com/scripts/banking-v2/configuration.md).

# Configuration

Page dedicated to how to configure our Banking \[V2]

Banking V2 keeps almost nothing in files. Banks, branches, ATMs, the economy, items and permissions live in the database and are edited in game in the [Admin Panel](https://wiki.qfdevelopers.com/scripts/banking-v2/admin-panel.md). The files below only start the resource and connect it to your server, and they all stay open after escrow.

## Languages

The start language is set in `config/config.lua`. After the first start it is changed in **Admin → General** without a restart, together with the currency symbol, number and date format and the account number prefix.

* `en`: English
* `pl`: Polish
* `de`: German
* `fr`: French
* `es`: Spanish
* `it`: Italian
* `pt`: Portuguese
* `ja`: Japanese
* `ko`: Korean

A tag such as `en-US` or `pt-BR` uses its language. The texts are in `config/translations/<code>.lua` (`t` for notifications and the console, `ui` for the interface). A key missing from a language falls back to English.

{% hint style="info" %}
To add a language, copy `config/translations/en.lua` to `<code>.lua`, change the code in its first lines, translate the values and add the file to `shared_scripts` in `fxmanifest.lua`. Keep every key and placeholder (such as `%s`) of `en.lua`. A missing key falls back to English.
{% endhint %}

### Commands & Keybinds

**Players**

* Interaction key (E): Talk to a teller, use an ATM, the ticket machine, a deposit box wall or a convoy point when no target resource is used. Players change it under Settings > Key Bindings > FiveM.
* `/billing`: Your bills, fines, taxes and sale contracts (when **Admin → Billing → Open bills anywhere** is on).
* `/ticketbook`: Issue fines and invoices for your billing faction, like the `ticket_book` item.

**Admin**

* `/bankadmin`: Open the admin panel.
* `/bankadmin van-hold`: Measure the cargo hold of the convoy van you stand behind (**Economy** permission).
* `/bankadmin pallet`: Place the convoy pallet and crates in front of you and fine-tune how crates stand on it (**Economy** permission).
* `/bankadmin atm-screen [txd] [texture]`: Measure the screen of the ATM model in front of you for the ATM on the machine's screen (**ATMs** permission).

**Server console**

* `bankadmin`: Prints the version, framework, inventory, target and database schema.
* `bankadmin import-v1`: Imports accounts, history and places from Banking V1.
* `bankadmin import-billing`: Imports bills and the income chart from qf\_billing.

{% hint style="info" %}
The names of `/bankadmin`, `/billing` and `/ticketbook` are the defaults. The first is set in `config/config.lua`, the other two in **Admin → Billing**.
{% endhint %}

***

## General

`config/config.lua` is the only config file sent to players. It only holds what the resource needs before the database is read.

```lua
Config.Debug = false
Config.Locale = 'en'       -- start language, later changed in Admin -> General

-- 'auto' picks the first started resource. Set a value to force it.
Config.Framework = 'auto'  -- 'auto' | 'esx' | 'qbcore' | 'qbox'
Config.Inventory = 'auto'  -- 'auto' | 'ox_inventory' | 'qb-inventory' | 'ps-inventory' | 'lj-inventory' | 'qs-inventory' | 'custom' | 'framework' | 'esx'
Config.Target = 'auto'     -- 'auto' | 'ox_target' | 'qb-target' | 'qtarget' | 'none'
Config.Notify = 'qf'       -- 'qf' | 'framework' | 'ox_lib' | 'custom'
Config.VehicleKeys = 'auto' -- start value, later changed in Admin -> Economy -> Convoys

Config.AdminCommand = 'bankadmin'
Config.AdminAccess = {
    groups = { 'superadmin', 'admin', 'god' }, -- ESX groups / QBCore and QBox permissions
    ace = 'qf_banking.admin'                   -- add_ace group.admin qf_banking.admin allow
}

-- Your own bank logos from web/custom/logos/
Config.CustomLogos = {
    -- 'my_bank.png',
}
```

A typo in `Config.Framework`, `Config.Inventory` or `Config.Target` is reported in the console and read as `auto`.

### Notifications (`Config.Notify`)

* `qf`: The QF toasts (default), shown also when no bank screen is open.
* `framework`: okokNotify or mythic\_notify when started, otherwise ESX `ShowNotification`, the QBCore notify or ox\_lib on QBox.
* `ox_lib`: `lib.notify`.
* `custom`: Your own function, `NOTIFY.Custom` at the top of `bridge/notify.client.lua`. Return `false` from it to fall back to `framework`.

### Discord logs

Webhooks are set in `config/config.server.lua`, which is never sent to players. Leave a channel empty to turn it off.

```lua
ConfigServer.Webhooks = {
    transactions = '',
    ownership = '',
    loans = '',
    staff = '',
    admin = ''
}
```

**Admin → General → Limits → Log to Discord from** sets the smallest transaction that is logged. Each channel posts at most one message every 2.5 seconds, so a busy server never hits Discord's rate limit. The format of the messages is in `server/logs.lua`.

***

## Framework, Inventory and Target

The bridges in `bridge/` connect the resource to your server. To support another resource, change the function bodies and keep the names.

| File                                                             | What it holds                                                                                              |
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `bridge/shared.lua`                                              | Detection of the framework, inventory and target.                                                          |
| `bridge/framework.server.lua`                                    | Players, money, jobs, society accounts (billing) and dirty money (robbery loot).                           |
| `bridge/framework.client.lua`                                    | Player data, callbacks, and when a player counts as downed.                                                |
| `bridge/inventory.server.lua`                                    | Items, metadata, stashes for deposit boxes. The `CUSTOM` functions at the top connect any other inventory. |
| `bridge/inventory.client.lua`                                    | Item checks and stash opening on the client.                                                               |
| `bridge/target.client.lua`                                       | ox\_target, qb-target and qtarget.                                                                         |
| `bridge/notify.client.lua`                                       | Notifications and help text.                                                                               |
| `bridge/vehiclekeys.server.lua`, `bridge/vehiclekeys.client.lua` | Keys of the convoy van and of vehicles sold by contract.                                                   |

### Another inventory

Inventories with their own exports and item metadata (codem-inventory, tgiann-inventory, core\_inventory, origen\_inventory, ak47\_inventory or your own) are connected with `Config.Inventory = 'custom'`. Fill in the `CUSTOM` functions at the top of `bridge/inventory.server.lua` (`AddItem`, `RemoveItem`, `GetItemsByName`, `GetItems`, `SetItemMetadata`, `OpenStash`, `IsStashEmpty`) and, on the client, `CUSTOM.GetItemCount` and `CUSTOM.OpenStash` in `bridge/inventory.client.lua`. A function left `nil` uses the framework's own item functions.

An inventory that only hooks into the framework's player item functions works with `Config.Inventory = 'framework'`.

### Society accounts

Billing pays a faction's bills into its society account through `FRAMEWORK.AddSocietyMoney` in `bridge/framework.server.lua`. By default it uses `esx_addonaccount` on ESX, `qb-banking` 2.x or `qb-management` on QBCore and `Renewed-Banking` on QBox. For another banking resource change `GetSocietyMoney`, `AddSocietyMoney` and `RemoveSocietyMoney`.

### Vehicle keys

The crew of a convoy gets the keys of the van when they pick it up at the depot, and loses them when the van is returned, the run fails or they leave the crew. The buyer of a vehicle sold by contract gets its keys the same way. The key script is picked in **Admin → Economy → Convoys → Vehicle keys** (`Config.VehicleKeys` is only the start value):

* `auto`: the first started script from the list below (default).
* `qbx_vehiclekeys`, `qb-vehiclekeys`, `Renewed-Vehiclekeys`, `MrNewbVehicleKeys`, `wasabi_carlock`, `qs-vehiclekeys`, `vehicles_keys` (Jaksam), `mk_vehiclekeys`, `t1ger_keys`, `cd_garage`, `okokGarage`.
* `custom`: your own key script, connected in `VEHICLEKEYS.CustomGive` and `VEHICLEKEYS.CustomRemove` at the top of `bridge/vehiclekeys.server.lua`.
* `none`: no keys are given; the van is left unlocked.

```lua
function VEHICLEKEYS.CustomGive(source, vehicle, plate)
    exports['my_keys']:GiveKeys(source, plate)
    return true
end

function VEHICLEKEYS.CustomRemove(source, vehicle, plate)
    exports['my_keys']:RemoveKeys(source, plate)
end
```

{% hint style="info" %}
`mk_vehiclekeys`, `cd_garage` and `okokGarage` have no way to take keys back, so with them the keys stay with the player after the run.
{% endhint %}

### Dirty money

Robbery loot is paid through `FRAMEWORK.AddDirtyMoney`: the `black_money` account on ESX, one `markedbills` item with its `worth` on QBCore and the `black_money` item on QBox. Another account or item is set in **Admin → Robberies**.

***

## Your Own Look

* `web/custom/logos/`: Your own bank logos (square png, webp, jpg or svg, about 256 px, transparent background). List the file names in `Config.CustomLogos` and they appear next to the logo presets in **Admin → Banks** and in the owner's **Branding** module.
* `web/custom/custom.css`: Loaded after the interface, so any rule here wins. The bank colour is `--bank`, the dark surfaces are the `--b-*` variables.

Every bank also has its own colour, card colour and logo, set by the admin or by the bank's owner, and a letter logo in the Fleeca style can be generated for any letter and colour.

***

## Editable Files

Everything that depends on your server is left open by escrow. Every open file starts with `-- @qf_editable <version>`, and on start the console lists the files older than the release, so after an update you know which ones to merge. A function the resource needs but cannot find, or one that throws an error, is reported once and the default behaviour is used, so money logic keeps working.

| Path                                         | What it holds                                                                                                     |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `config/config.lua`                          | Start language, framework, inventory, target, notifications, admin command and access, logos                      |
| `config/config.server.lua`                   | Discord webhooks (server only)                                                                                    |
| `config/legacy.lua`                          | Optional: your V1 config, only for the one-time import                                                            |
| `config/translations/*.lua`                  | Texts in 9 languages                                                                                              |
| `bridge/*.lua`                               | Framework, inventory, target, notifications and vehicle keys                                                      |
| `client/editable.lua`, `server/editable.lua` | Hooks: animations, sounds, GPS, dispatch, phone, photos, vehicle keys, vehicles and properties for sale contracts |
| `server/logs.lua`                            | Discord webhook format and delivery                                                                               |
| `web/custom/`                                | Style overrides and your own logos                                                                                |
| `install/`                                   | Item definitions for each inventory (not loaded by the resource)                                                  |

Every hook is listed in [Additional Informations](https://wiki.qfdevelopers.com/scripts/banking-v2/additional-informations.md#developer-api-exports-and-events).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wiki.qfdevelopers.com/scripts/banking-v2/configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
