Links
Comment on page

okokBanking

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;
ALTER TABLE `management_funds` 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

qb-management Support

Navigate to qb-management/server/sv_boss.lua and add the following code underneath the function RemoveMoney:
function AddMoneyOkokBanking(account, amount)
if not Accounts[account] then
Accounts[account] = 0
end
Accounts[account] = Accounts[account] + amount
MySQL.Async.execute('UPDATE management_funds SET amount = ? WHERE job_name = ?', { Accounts[account], account })
end
function RemoveMoneyOkokBanking(account, amount)
local isRemoved = false
if amount > 0 then
if not Accounts[account] then
Accounts[account] = 0
end
if Accounts[account] >= amount then
Accounts[account] = Accounts[account] - amount
isRemoved = true
end
MySQL.Async.execute('UPDATE management_funds SET amount = ? WHERE job_name = ?', { Accounts[account], account })
end
return isRemoved
end
function TransferMoneyOkokBanking(account, amount, iban)
if not Accounts[account] then
Accounts[account] = 0
end
Accounts[account] = Accounts[account] + amount
MySQL.Async.execute('UPDATE management_funds SET amount = ? WHERE iban = ?', { Accounts[account], iban })
end
Navigate to qb-management/fxmanifest.lua and add the previous functions names to the server_exports:
server_exports {
'AddMoney',
'AddGangMoney',
'RemoveMoney',
'RemoveGangMoney',
'GetAccount',
'GetGangAccount',
'AddMoneyOkokBanking', -- add this
'RemoveMoneyOkokBanking', -- add this
'TransferMoneyOkokBanking' -- add this
}

Server artifacts

Make sure your server artifacts version is above the 5181.