forked from Simnation/Main
fix
This commit is contained in:
parent
93eca35471
commit
51d9f2d06e
2 changed files with 13 additions and 8 deletions
|
@ -70,8 +70,8 @@ Config.JobBossRanks = {
|
|||
specificRanks = {}
|
||||
},
|
||||
["cinema"] = {
|
||||
maxRank = false, -- Will automatically detect the highest rank
|
||||
specificRanks = {0,1} -- Or you can specify ranks like {3, 4} if needed
|
||||
maxRank = true, -- Will automatically detect the highest rank
|
||||
specificRanks = {1} -- Or you can specify ranks like {3, 4} if needed
|
||||
},
|
||||
["kayas"] = {
|
||||
maxRank = true,
|
||||
|
|
|
@ -565,12 +565,16 @@ AddEventHandler("okokBanking:DepositMoneyToSociety", function(amount, society, s
|
|||
end
|
||||
|
||||
if amount <= playerMoney and not Config.UseCashAsItem or amount <= playerMoneyCash and Config.UseCashAsItem then
|
||||
if Config.UseQBManagement or Config.UseQBBanking then
|
||||
if Config.UseQBBanking then
|
||||
exports['qb-banking']:AddMoney(society, amount)
|
||||
else
|
||||
if Config.UseQBManagement then
|
||||
exports['qb-management']:AddMoney(society, amount)
|
||||
end
|
||||
elseif Config.UseQBBanking then
|
||||
-- Direct database update for qb-banking since export isn't available
|
||||
MySQL.query('UPDATE bank_accounts SET account_balance = account_balance + @amount WHERE account_name = @society', {
|
||||
['@amount'] = amount,
|
||||
['@society'] = society,
|
||||
}, function(changed)
|
||||
print("Updated bank account for " .. society .. " with amount " .. amount)
|
||||
end)
|
||||
else
|
||||
MySQL.query('UPDATE okokbanking_societies SET value = value + @value WHERE society = @society AND society_name = @society_name', {
|
||||
['@value'] = amount,
|
||||
|
@ -612,6 +616,7 @@ AddEventHandler("okokBanking:DepositMoneyToSociety", function(amount, society, s
|
|||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterServerEvent("okokBanking:WithdrawMoneyToSociety")
|
||||
AddEventHandler("okokBanking:WithdrawMoneyToSociety", function(amount, society, societyName, societyMoney)
|
||||
local _source = source
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue