start veriyorum yukleniyorda kalıyor hepsine start verdim
1. adım manuel olarak datana okut
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
);
2. adım bunuda manuel olarak okut ;
ALTER TABLE `players` ADD COLUMN `pincode` int(50) NULL DEFAULT NULL;
ALTER TABLE `management_funds` ADD COLUMN `iban` varchar(255) DEFAULT NULL;
3.adım
qb-core/server/player.lua yı aç ve şu satırı bul self.Functions.SetJobDuty(onDuty)
satırı şunun ile değiş
self.Functions.ChangeIban = function(iban)
self.PlayerData.charinfo.account = iban
self.Functions.UpdatePlayerData()
end
4.adım
qb-management/server/sv_boss.lua açtıktan sonra ;
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
5. adım qb-management/fxmanifest.lua açınca
server_exports {
'AddMoney',
'AddGangMoney',
'RemoveMoney',
'RemoveGangMoney',
'GetAccount',
'GetGangAccount',
'AddMoneyOkokBanking', -- add this
'RemoveMoneyOkokBanking', -- add this
'TransferMoneyOkokBanking' -- add this
}
kısmını değiştirdikten sonra sorunsuz çalışması lazım .