> For the complete documentation index, see [llms.txt](https://docs.okokscripts.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.okokscripts.io/scripts/okokbankingv2/legacy-docs-v1.md).

# Legacy Docs (V1)

[**YouTube Video**](https://www.youtube.com/watch?v=-bC489zMaZI)

## **Installation Guide**

#### Execute the following SQL code in your database:

```sql
CREATE TABLE `okokbanking_transactions`	(
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `receiver_identifier` varchar(255) NOT NULL,
    `receiver_name` varchar(255) NOT NULL,
    `sender_identifier` varchar(255) NOT NULL,
    `sender_name` varchar(255) NOT NULL,
    `date` varchar(255) NOT NULL,
    `value` int(50) NOT NULL,
    `type` varchar(255) NOT NULL,
    PRIMARY KEY (`id`)
);

CREATE TABLE `okokbanking_societies`	(
    `society` varchar(255) NULL DEFAULT NULL,
    `society_name` varchar(255) NULL DEFAULT NULL,
    `value` int(50) NULL DEFAULT NULL,
    `iban` varchar(255) NOT NULL,
    `is_withdrawing` int(1) NULL DEFAULT NULL
);
```

If using **ESX**, execute the following code as well:

```sql
ALTER TABLE `users` ADD COLUMN `iban` varchar(255) NULL DEFAULT NULL;
ALTER TABLE `users` ADD COLUMN `pincode` int(50) NULL DEFAULT NULL;
```

If using **QBCore**, execute the following code:

```sql
ALTER TABLE `players` ADD COLUMN `pincode` int(50) NULL DEFAULT NULL;
```

**\[QBCore]** If using **management funds**:

```sql
ALTER TABLE `management_funds` ADD COLUMN `iban` varchar(255) DEFAULT NULL;
```

**\[QBCore]** If not using management funds:

```sql
ALTER TABLE `bank_accounts` ADD COLUMN `iban` varchar(255) DEFAULT NULL;
```

#### QBCORE ONLY <a href="#qbcore-only" id="qbcore-only"></a>

Navigate to **qb-core/server/player.lua** and add the following code underneath **`function self.Functions.SetJobDuty(onDuty) ... end`**:

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

#### **Exports** <a href="#exports" id="exports"></a>

```lua
exports['okokBanking']:GetAccount(society)
exports['okokBanking']:AddMoney(society, value)
exports['okokBanking']:RemoveMoney(society, value)
```

#### Server artifacts <a href="#server-artifacts" id="server-artifacts"></a>

Make sure your server artifacts version is above the **5181**.

* Windows: [https://runtime.fivem.net/artifacts/fivem/build\_server\_windows/master/](https://web.archive.org/web/20251110125631mp_/https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/)
* Linux: [https://runtime.fivem.net/artifacts/fivem/build\_proot\_linux/master/](https://web.archive.org/web/20251110125631mp_/https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/)
