mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Merge pull request #349 from jnccloud/patch-1
Index is incorrect when players disconnect
This commit is contained in:
@@ -111,8 +111,7 @@ end
|
||||
|
||||
function PaycheckLoop()
|
||||
local Players = QBCore.Functions.GetQBPlayers()
|
||||
for i = 1, #Players, 1 do
|
||||
local Player = Players[i]
|
||||
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
|
||||
Player.Functions.AddMoney('bank', payment)
|
||||
@@ -328,4 +327,4 @@ function QBCore.Functions.IsLicenseInUse(license)
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user