Skip to content

Commit

Permalink
Merge pull request #1184 from s0t7x/patch-1
Browse files Browse the repository at this point in the history
Update functions.lua
  • Loading branch information
GhzGarage authored Mar 9, 2025
2 parents 7c4ef61 + 62e6a6f commit fac67bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,10 @@ function QBCore.Functions.CreateVehicle(source, model, vehtype, coords, warp)
end

function PaycheckInterval()
if not next(QBCore.Players) then return end
if not next(QBCore.Players) then
SetTimeout(QBCore.Config.Money.PayCheckTimeOut * (60 * 1000), PaycheckInterval) -- Prevent paychecks from stopping forever once 0 players
return
end
for _, Player in pairs(QBCore.Players) do
if not Player then return end
local payment = QBShared.Jobs[Player.PlayerData.job.name]['grades'][tostring(Player.PlayerData.job.grade.level)].payment
Expand Down

0 comments on commit fac67bd

Please sign in to comment.