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

# Installation

Install Cuxial Banking step by step: dependencies, inventory items, convars and start order.

Cuxial Banking needs no SQL import. It creates and updates its own tables on every start. You only add the inventory items and, if you want logs, one convar.

{% stepper %}
{% step %}

## Check the dependencies

These must be installed and working before you add the bank:

* `ox_lib`
* `oxmysql`
* `cuxial_bridge`, with a framework, an inventory and a target it supports
* OneSync enabled on the server

`cuxial_interactions` is optional. When it is running, a bank point that has a ped model becomes an attended NPC with its own blip. Without it, the same point works as a plain target zone with a blip.
{% endstep %}

{% step %}

## Remove your previous bank

Only one resource should manage bank accounts. Stop and remove any other banking script before starting this one.
{% endstep %}

{% step %}

## Copy the resource

Place the `cuxial_banking` folder inside your `resources` directory. Keep the folder name as it is.
{% endstep %}

{% step %}

## Add the items

The bank uses six inventory items: three card tiers, the cheque, the business chequebook and the printed receipt. The file `install/items.lua` has them ready for `ox_inventory`.

1. Copy the images from `install/images/` to `ox_inventory/web/images/`.
2. Paste the entries of `install/items.lua` inside the `return { ... }` table of `ox_inventory/data/items.lua`.

{% code title="ox\_inventory/data/items.lua" %}

```lua
['card_standard'] = {
    label = 'Standard Card',
    weight = 5,
    stack = false,
    close = true,
},

['card_premium'] = {
    label = 'Premium Card',
    weight = 5,
    stack = false,
    close = true,
},

['card_elite'] = {
    label = 'Gold Card',
    weight = 5,
    stack = false,
    close = true,
},

['bank_cheque'] = {
    label = 'Cheque',
    weight = 1,
    stack = false,
    close = true,
    consume = 0,
},

['bank_chequebook'] = {
    label = 'Business Chequebook',
    weight = 50,
    stack = false,
    close = true,
    consume = 0,
},

['printerdocument'] = {
    label = 'Bank Receipt',
    weight = 1,
    stack = false,
    close = true,
    consume = 0,
},
```

{% endcode %}

{% hint style="warning" %}
Keep `stack = false` on all six: each card, cheque and receipt carries its own data. `consume = 0` lets the cheque, the chequebook and the receipt be used without being spent.
{% endhint %}

The chequebook is not handed out by the bank. Give `bank_chequebook` to the bosses who should issue business cheques, through a shop, a job stash or your admin tools.
{% endstep %}

{% step %}

## Set how cash is handled

By default the bank treats cash as an inventory item named `money`. Before the first start, make it match your server:

{% tabs %}
{% tab title="Cash is an inventory item" %}
Set the name of your cash item.

{% code title="shared/config.lua" %}

```lua
general = {
    -- ...
    cashItem = 'cash',
},
```

{% endcode %}
{% endtab %}

{% tab title="Cash is a framework account" %}
Turn the item mode off.

{% code title="data/general.lua" %}

```lua
UseCashAsItem = false,
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
After the first start, this setting lives in the database. Change it from `/bankadmin` → Config → General. See [Configuration](/scripts/core/cuxial-banking/configuration.md#where-settings-live).
{% endhint %}
{% endstep %}

{% step %}

## Set the convars

All of them are optional.

{% code title="server.cfg" %}

```cfg
# Language (en and es are included)
setr ox:locale "en"

# Discord webhook for bank logs
set cuxial_banking_webhook "https://discord.com/api/webhooks/..."

# Optional: a different webhook for one log type
set cuxial_banking_webhook_transfer "https://discord.com/api/webhooks/..."

# Debug traces in the console
setr cuxial_banking_debug "0"
```

{% endcode %}

{% hint style="info" %}
The webhook goes in `server.cfg`, never in the files of the resource. Without it, no logs are sent.
{% endhint %}
{% endstep %}

{% step %}

## Start the resource

Start the bank after its dependencies, your framework, your inventory and your target:

{% code title="server.cfg" %}

```cfg
ensure ox_lib
ensure oxmysql
# your framework, inventory and target here
ensure cuxial_bridge
# optional
ensure cuxial_interactions
ensure cuxial_banking
```

{% endcode %}

On the first start the console lists each database step as it is applied, creates a business account for every job of your framework, and creates the bank branches from `data/banks.lua`.

{% hint style="warning" %}
On frameworks that store characters in a `players` table, the first start adds five columns to it: `pincode`, `cuxial_credit_score`, `cuxial_bank_contacts`, `opening_date` and `iban`. Back up your database before installing.
{% endhint %}
{% endstep %}

{% step %}

## Check that it works

1. Join the server and go to a bank. The blip is on the map and the target option opens the bank.
2. Deposit some cash and withdraw it again. The balance and the history update.
3. Order a card at the bank, then use it at an ATM with its PIN.
4. Type `/bankadmin` with a staff account. The panel opens.
   {% endstep %}
   {% endstepper %}

Next: learn how each part works in the [Features guide](/scripts/core/cuxial-banking/features.md), or adjust the bank in [Configuration](/scripts/core/cuxial-banking/configuration.md).


---

# 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://docs.cuxial.com/scripts/core/cuxial-banking/installation.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.
