Skip to content

Commit fac67bd

Browse files
authored
Merge pull request #1184 from s0t7x/patch-1
Update functions.lua
2 parents 7c4ef61 + 62e6a6f commit fac67bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/functions.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,10 @@ function QBCore.Functions.CreateVehicle(source, model, vehtype, coords, warp)
395395
end
396396

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

0 commit comments

Comments
 (0)