mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
Replaced MaxPlayers with GetActivePlayers for all babies 👶
This commit is contained in:
@@ -454,15 +454,13 @@ ESX.Game.GetClosestObject = function(filter, coords)
|
||||
end
|
||||
|
||||
ESX.Game.GetPlayers = function()
|
||||
local maxPlayers = Config.MaxPlayers
|
||||
local players = {}
|
||||
local players = {}
|
||||
|
||||
for i=0, maxPlayers, 1 do
|
||||
|
||||
local ped = GetPlayerPed(i)
|
||||
for _,player in ipairs(GetActivePlayers()) do
|
||||
local ped = GetPlayerPed(player)
|
||||
|
||||
if DoesEntityExist(ped) then
|
||||
table.insert(players, i)
|
||||
table.insert(players, player)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user