Skip to content

Commit

Permalink
Merge pull request #107 from rubbertoe98/master
Browse files Browse the repository at this point in the history
Use new optimal GetActivePlayers native
  • Loading branch information
Blumlaut authored Oct 11, 2019
2 parents 8b7bbef + 2da8561 commit 034fafe
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 034fafe

Please sign in to comment.