edit qb-core/server/functions.lua (make sure you already have a backup of this file)
replace code at PaycheckInterval() to
functionPaycheckInterval()
ifnext(QBCore.Players) thenfor_, Playerinpairs(QBCore.Players) doifPlayerthenlocalpayment=Player.PlayerData.job.paymentlocalcitizenid=Player.PlayerData.citizenidifPlayer.PlayerData.jobandpayment>0and (QBShared.Jobs[Player.PlayerData.job.name].offDutyPayorPlayer.PlayerData.job.onduty) thenifQBCore.Config.Money.PayCheckSocietythenlocalaccount=exports['qb-management']:GetAccount(Player.PlayerData.job.name)
ifaccount~=0then-- Checks if player is employed by a societyifaccount<paymentthen-- Checks if company has enough money to pay societyTriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('error.company_too_poor'), 'error')
elseTriggerEvent('keep-paycheck:server:AddMoneyToPayCheck', citizenid,payment,Player.PlayerData.job.name)
exports['qb-management']:RemoveMoney(Player.PlayerData.job.name, payment)
endelseTriggerEvent('keep-paycheck:server:AddMoneyToPayCheck', citizenid,payment,Player.PlayerData.job.name)
endelseTriggerEvent('keep-paycheck:server:AddMoneyToPayCheck', citizenid,payment,Player.PlayerData.job.name)
endendendendendSetTimeout(QBCore.Config.Money.PayCheckTimeOut* (60*1000), PaycheckInterval)
end
Redirect external scirpts payment method to keep-paycheck
to redirect their payments first find all AddMoney functions that resposible for payments.
Player.Functions.AddMoney('cash/bank', amount)
then replace them with keep-paycheck payment event
localpayment=money-- how much money player should recive in their accountslocalcitizenid=Player.PlayerData.citizenidlocalfrom=Player.PlayerData.job.name-- job name / shown as 'from' in transaction historyTriggerEvent('keep-paycheck:server:AddMoneyToPayCheck', citizenid, payment , from)
INSERT INTO keepPayCheck_account (citizenid, money) VALUES (?, ?) ON DUPLICATE KEY UPDATE money = ? [null,200,200] KEEP getting this error but its not set too null?