GET_ACTIVE_PLAYERS: the replacement for player loops

With changing this a have 2 big problems. Trop items can see and pick all player on the server without being near and second admin menu have problem, I can see only close players…

:slight_smile: :smile:

how to write this in C# ?

List<dynamic> players = API.GetActivePlayers();

foreach (int i in players)
{
  // ...
}

Haven’t tested but should work.

Its returning 0

List<dynamic> players = API.GetActivePlayers();
            foreach (int number in players)
            {
                Main.SendChatMessage("b", number.ToString(),255,0,0);
            }

if ur using oneSync-infinity, this won’t work properly as “infinity” has it’s own client resource control

Because you’re alone on a server? Or nobody else in your radius?

do you know how to fix it then? get it from server side? if so how?