# zpx-banking

## IMPORTANT

This script automatically inserts the database tables, eliminating the need to run the SQL code provided. If you encounter issues with the automated installation, consider manually running the sql instead.

### DEPENDENCIES

{% hint style="info" %}
ox\_lib - <https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip>
{% endhint %}

### QBCORE ONLY

Add the following item on **qb-core/shared/items.lua**:

```lua
bankcard = { name = 'bankcard', label = 'Bank Card', weight = 0, type = 'item', image = 'bankcard.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Used to access ATM' },
```

Search for this function on **qb-core/server/player.lua:**

```lua
function self.Functions.SetPlayerData(key, val)
    if not key or type(key) ~= 'string' then return end
    self.PlayerData[key] = val
    self.Functions.UpdatePlayerData()
end
```

And under that, add the following code:

```lua
function self.Functions.ChangePlayerAccount(account)
    self.PlayerData.charinfo.account = account
    self.Functions.UpdatePlayerData()
end
```

### ESX ONLY

Add the following item on the database:

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('bankcard', 'Bank Card', 1, 1, 1)
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zorpex.gitbook.io/zorpex-documentation/assets/zpx-banking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
