Skip to content

Commit

Permalink
Merge pull request #6 from JericoFX/master
Browse files Browse the repository at this point in the history
Update main.lua
  • Loading branch information
Giana committed Mar 19, 2023
2 parents 4c77679 + a6441a4 commit 43d3630
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ end)
QBCore.Functions.CreateCallback('g-drugselling:server:getCopCount', function(source, cb)
local src = source
local policeCount = 0
for _, v in pairs(QBCore.Functions.GetQBPlayers()) do
if v.PlayerData.job.name == "police" and v.PlayerData.job.onduty then
policeCount = policeCount + 1
end
end
CachedPolice[src] = policeCount
cb(policeCount)
end)
local amount = QBCore.Functions.GetDutyCount("police")
CachedPolice[src] = amount
cb(amount)
end)

0 comments on commit 43d3630

Please sign in to comment.