mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 22:01:28 +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
|
||||
|
||||
|
||||
@@ -10,6 +10,5 @@ Config.DisableWantedLevel = true
|
||||
Config.EnableHud = true -- enable the default hud? Display current job and accounts (black, bank & cash)
|
||||
|
||||
Config.PaycheckInterval = 7 * 60000
|
||||
Config.MaxPlayers = GetConvarInt('sv_maxclients', 32) -- set this value to 255 if you're running OneSync
|
||||
|
||||
Config.EnableDebug = false
|
||||
|
||||
Reference in New Issue
Block a user