From a8c73179704a544e48514b9364bd1aecbd270012 Mon Sep 17 00:00:00 2001 From: AJ <66404074+ihyajb@users.noreply.github.com> Date: Thu, 28 Oct 2021 04:10:21 -0400 Subject: [PATCH] feat(server): Only get paid while on Duty --- server/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/functions.lua b/server/functions.lua index 29bfc27..df099b4 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -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