1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-06-29 07:15:36 +02:00
parent 93eca35471
commit 51d9f2d06e
2 changed files with 13 additions and 8 deletions

View file

@ -70,8 +70,8 @@ Config.JobBossRanks = {
specificRanks = {} specificRanks = {}
}, },
["cinema"] = { ["cinema"] = {
maxRank = false, -- Will automatically detect the highest rank maxRank = true, -- Will automatically detect the highest rank
specificRanks = {0,1} -- Or you can specify ranks like {3, 4} if needed specificRanks = {1} -- Or you can specify ranks like {3, 4} if needed
}, },
["kayas"] = { ["kayas"] = {
maxRank = true, maxRank = true,

View file

@ -565,12 +565,16 @@ AddEventHandler("okokBanking:DepositMoneyToSociety", function(amount, society, s
end end
if amount <= playerMoney and not Config.UseCashAsItem or amount <= playerMoneyCash and Config.UseCashAsItem then if amount <= playerMoney and not Config.UseCashAsItem or amount <= playerMoneyCash and Config.UseCashAsItem then
if Config.UseQBManagement or Config.UseQBBanking then if Config.UseQBManagement then
if Config.UseQBBanking then exports['qb-management']:AddMoney(society, amount)
exports['qb-banking']:AddMoney(society, amount) elseif Config.UseQBBanking then
else -- Direct database update for qb-banking since export isn't available
exports['qb-management']:AddMoney(society, amount) MySQL.query('UPDATE bank_accounts SET account_balance = account_balance + @amount WHERE account_name = @society', {
end ['@amount'] = amount,
['@society'] = society,
}, function(changed)
print("Updated bank account for " .. society .. " with amount " .. amount)
end)
else else
MySQL.query('UPDATE okokbanking_societies SET value = value + @value WHERE society = @society AND society_name = @society_name', { MySQL.query('UPDATE okokbanking_societies SET value = value + @value WHERE society = @society AND society_name = @society_name', {
['@value'] = amount, ['@value'] = amount,
@ -612,6 +616,7 @@ AddEventHandler("okokBanking:DepositMoneyToSociety", function(amount, society, s
end end
end) end)
RegisterServerEvent("okokBanking:WithdrawMoneyToSociety") RegisterServerEvent("okokBanking:WithdrawMoneyToSociety")
AddEventHandler("okokBanking:WithdrawMoneyToSociety", function(amount, society, societyName, societyMoney) AddEventHandler("okokBanking:WithdrawMoneyToSociety", function(amount, society, societyName, societyMoney)
local _source = source local _source = source