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 = {}
|
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,
|
||||||
|
|
|
@ -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-banking']:AddMoney(society, amount)
|
|
||||||
else
|
|
||||||
exports['qb-management']:AddMoney(society, amount)
|
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
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue