feat(server/functions): Add a function to retrieve all xPlayer data

If people need to loop through xPlayers, they should use this
This commit is contained in:
Linden
2021-05-23 22:18:27 +10:00
parent b88930674c
commit bc13c9d34b
+10
View File
@@ -227,6 +227,16 @@ ESX.GetPlayers = function()
return sources
end
ESX.GetExtendedPlayers = function()
local xPlayers = {}
for k,v in pairs(ESX.Players) do
xPlayers[k] = v
end
return xPlayers
end
ESX.GetPlayerFromId = function(source)
return ESX.Players[tonumber(source)]
end