Replaced MaxPlayers with GetActivePlayers for all babies 👶

This commit is contained in:
ElPumpo
2019-07-20 13:09:42 +02:00
parent 954572c934
commit 9fa0c12e02
2 changed files with 4 additions and 7 deletions
+4 -6
View File
@@ -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
-1
View File
@@ -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