okokDocs
  • About Us
  • Scripts
    • okokVehicleControl
      • Config file
    • okokMechanicJob
      • Config file
    • okokPoliceJob
      • Config file
      • qb-inventory support
    • okokBossMenu
      • Config file
    • okokMulticharacter
      • Config file
    • okokPhone
    • okokSpawnSelector
      • Config file
      • qb-multicharacter support
    • okokLoadingScreen
      • Config file
    • okokVehicleSales
      • Config file
    • okokShop
      • Config file
    • okokGasStation
      • Config file
    • okokTuning
      • Config file
    • okokGarage
      • Config file
      • RGB vehicle colors
      • Inventories metadata
      • Housing integrations
      • qb-phone support
    • okokVehicleShop
      • Config file
      • Common errors
    • okokBanking
      • Config file
      • Paycheck transactions
      • Registering transactions
    • okokMarketplace
      • Config file
      • Common errors
    • okokChat
      • Config file
      • Export
    • okokBilling
      • Config file
      • Snippets
    • okokCrafting
      • Config file
    • okokContract
      • Config file
    • okokTalkToNPC
      • Config file
    • okokReports
      • Config file
    • okokNotify
      • Config file
      • Snippets
    • okokTextUI
      • Config file
      • Snippets
    • okokRequests
    • okokDeleteVehicles
      • Config file
  • Others
    • Discord Webhook
Powered by GitBook
On this page
  • Installation Guide
  • QBCORE ONLY
  • Exports
  • Server artifacts
  1. Scripts

okokBanking

PreviousCommon errorsNextConfig file

Last updated 6 months ago

Installation Guide

Execute the following SQL code in your database:

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:

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:

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

[QBCore] If using management funds:

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

[QBCore] If not using management funds:

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

QBCORE ONLY

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

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

Exports

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

Server artifacts

Make sure your server artifacts version is above the 5181.

Windows:

Linux:

YouTube Video
https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/
https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/