Skip to content

Commit

Permalink
fix: correct qbx_management exports in paychecks (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevX32 committed Oct 16, 2023
1 parent 6ebfd81 commit 0d6e088
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/loops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ lib.cron.new(('*/%s * * * *'):format(Config.Money.PaycheckTimeout), function()
if not payment then payment = player.PlayerData.job.payment end
if player.PlayerData.job and payment > 0 and (QBX.Shared.Jobs[player.PlayerData.job.name].offDutyPay or player.PlayerData.job.onduty) then
if Config.Money.PaycheckSociety then
local account = exports['qbx-management']:GetAccount(player.PlayerData.job.name)
local account = exports['qbx_management']:GetAccount(player.PlayerData.job.name)
if account ~= 0 then -- Checks if player is employed by a society
if account < payment then -- Checks if company has enough money to pay society
TriggerClientEvent('QBCore:Notify', player.PlayerData.source, Lang:t('error.company_too_poor'), 'error')
else
player.Functions.AddMoney('bank', payment)
exports['qbx-management']:RemoveMoney(player.PlayerData.job.name, payment)
exports['qbx_management']:RemoveMoney(player.PlayerData.job.name, payment)
TriggerClientEvent('QBCore:Notify', player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
end
else
Expand Down

3 comments on commit 0d6e088

@StrixLuca
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exports['qb-management']:GetAccount => exports['Renewed-Banking']:getAccountMoney
exports['qb-management']:AddMoney => exports['Renewed-Banking']:addAccountMoney
exports['qb-management']:RemoveMoney => exports['Renewed-Banking']:removeAccountMoney
exports['qb-management']:GetGangAccount=> exports['Renewed-Banking']:getAccountMoney
exports['qb-management']:AddGangMoney=> exports['Renewed-Banking']:addAccountMoney
exports['qb-management']:RemoveGangMoney=> exports['Renewed-Banking']:removeAccountMoney

qbx use Renewed-Banking??? why we still use qb-management

@Manason
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exports['qb-management']:GetAccount => exports['Renewed-Banking']:getAccountMoney exports['qb-management']:AddMoney => exports['Renewed-Banking']:addAccountMoney exports['qb-management']:RemoveMoney => exports['Renewed-Banking']:removeAccountMoney exports['qb-management']:GetGangAccount=> exports['Renewed-Banking']:getAccountMoney exports['qb-management']:AddGangMoney=> exports['Renewed-Banking']:addAccountMoney exports['qb-management']:RemoveGangMoney=> exports['Renewed-Banking']:removeAccountMoney

qbx use Renewed-Banking??? why we still use qb-management

I believe qbx_management calls renewed-banking.

@DevX32
Copy link
Contributor Author

@DevX32 DevX32 commented on 0d6e088 Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exports['qb-management']:GetAccount => exports['Renewed-Banking']:getAccountMoney exports['qb-management']:AddMoney => exports['Renewed-Banking']:addAccountMoney exports['qb-management']:RemoveMoney => exports['Renewed-Banking']:removeAccountMoney exports['qb-management']:GetGangAccount=> exports['Renewed-Banking']:getAccountMoney exports['qb-management']:AddGangMoney=> exports['Renewed-Banking']:addAccountMoney exports['qb-management']:RemoveGangMoney=> exports['Renewed-Banking']:removeAccountMoney

qbx use Renewed-Banking??? why we still use qb-management

not every script support renewed banking

Please sign in to comment.