Skip to content

Commit

Permalink
Use new optimal GetActivePlayers native
Browse files Browse the repository at this point in the history
  • Loading branch information
rubbertoe98 committed Oct 11, 2019
1 parent 8b7bbef commit 2da8561
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gui_c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,8 @@ function GenerateMenu() -- this is a big ass function
-- util stuff
players = {}
local localplayers = {}
for i = 0, 256 do
if NetworkIsPlayerActive( i ) then
table.insert( localplayers, GetPlayerServerId(i) )
end
for _, i in ipairs(GetActivePlayers()) do
table.insert( localplayers, GetPlayerServerId(i) )
end
table.sort(localplayers)
for i,thePlayer in ipairs(localplayers) do
Expand Down

0 comments on commit 2da8561

Please sign in to comment.