feat(paychecks): Jobs Off Duty Payment Option

This commit is contained in:
MiddleSkillz
2021-12-16 19:52:00 -07:00
parent e7c4562289
commit d56bdd2b98
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ function PaycheckLoop()
local Players = QBCore.Functions.GetQBPlayers()
for _, Player in pairs(Players) do
local payment = Player.PlayerData.job.payment
if Player.PlayerData.job and Player.PlayerData.job.onduty and payment > 0 then
if Player.PlayerData.job and payment > 0 and (QBShared.Jobs[Player.PlayerData.job.name].offDutyPay or Player.PlayerData.job.onduty) then
Player.Functions.AddMoney('bank', payment)
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, ('You received your paycheck of $%s'):format(payment))
end