mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 18:28:52 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user