mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-03 03:38:53 +00:00
Merge pull request #295 from ihyajb/patch-1
feat(server): Only get paid while on Duty
This commit is contained in:
@@ -82,7 +82,7 @@ function PaycheckLoop()
|
||||
local Players = QBCore.Functions.GetPlayers()
|
||||
for i = 1, #Players, 1 do
|
||||
local Player = QBCore.Functions.GetPlayer(Players[i])
|
||||
if Player.PlayerData.job and Player.PlayerData.job.payment > 0 then
|
||||
if Player.PlayerData.job and Player.PlayerData.job.onduty and Player.PlayerData.job.payment > 0 then
|
||||
Player.Functions.AddMoney('bank', Player.PlayerData.job.payment)
|
||||
TriggerClientEvent('QBCore:Notify', Players[i], 'You received your paycheck of $' .. Player.PlayerData.job.payment)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user