fix wholesale esx

This commit is contained in:
Mustache Dom committed 2025-01-29 12:59:49 -08:00
1 parent f06778c345
commit df13abc3b0
1 file changed
+11
+11
View File
@@ -400,6 +400,7 @@ end
function getCops()
local amount = 0
if Config.Framework == 'qb' then
local players = QBCore.Functions.GetQBPlayers()
for k, v in pairs(players) do
if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then
@@ -407,6 +408,16 @@ function getCops()
end
end
return amount
elseif Config.Framework == 'esx' then
local players = ESX.GetPlayers()
for k, v in pairs(players) do
local xPlayer = ESX.GetPlayerFromId(v)
if xPlayer.job.name == 'police' and xPlayer.job.onduty then
amount = amount + 1
end
end
return amount
end
end
function getNear(src)