fix wholesale esx
This commit is contained in:
1 parent
f06778c345
commit
df13abc3b0
1 file changed
+17
-6
+17
-6
@@ -400,13 +400,24 @@ end
|
|||||||
|
|
||||||
function getCops()
|
function getCops()
|
||||||
local amount = 0
|
local amount = 0
|
||||||
local players = QBCore.Functions.GetQBPlayers()
|
if Config.Framework == 'qb' then
|
||||||
for k, v in pairs(players) do
|
local players = QBCore.Functions.GetQBPlayers()
|
||||||
if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then
|
for k, v in pairs(players) do
|
||||||
amount = amount + 1
|
if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then
|
||||||
end
|
amount = amount + 1
|
||||||
|
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
|
||||||
return amount
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function getNear(src)
|
function getNear(src)
|
||||||
|
|||||||
Reference in new issue
Block a user