mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
feat(server/functions): GetDutyCount
This commit is contained in:
@@ -92,6 +92,19 @@ function QBCore.Functions.GetPlayersOnDuty(job)
|
||||
return players, count
|
||||
end
|
||||
|
||||
function QBCore.Functions.GetDutyCount(job)
|
||||
local count = 0
|
||||
|
||||
for _, Player in pairs(QBCore.Players) do
|
||||
if Player.PlayerData.job.name == job then
|
||||
if Player.PlayerData.job.onduty then
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
return count
|
||||
end
|
||||
|
||||
-- Paychecks (standalone - don't touch)
|
||||
|
||||
function PaycheckLoop()
|
||||
|
||||
Reference in New Issue
Block a user