Problem with es_admin2

https://i.imgur.com/vyuc0N1.png maybe know how fix it? i nothing to change, try all mod off but not help ;/ yesterday workink fine

I got the same issue. Stopped working a few weeks ago.

I fix for self, if you on onesync

es_admin2/client.lua

function getPlayers()
local players = {}
for i = 0,32 do
if NetworkIsPlayerActive(i) then
table.insert(players, {id = GetPlayerServerId(i), name = GetPlayerName(i)})
end
end
return players
end

Change to:
for i = 0,255 do

1 Like

Better code for onesync (f** old loops).

function getPlayers()
    local players = {}
    for _, player in ipairs(GetActivePlayers()) do
        table.insert(players, {id = GetPlayerServerId(player), name = GetPlayerName(player)})
    end
    return players
end

This one works 2x faster and support both 32, 64 and 128 slots.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.