Jump to content
  • 0

Top lv player ??


mem981

Question

public static List<Player> OnlineList => Clients.FindAll(client => client?.Entity != null).Select(client => client.Entity).ToList();
Spoiler

if (input.Contains(Strings.Events.onlinelistcommand) ||
                    input.Contains(Strings.Events.onlinecountcommand))
                {
                    var onlineList = Globals.OnlineList;
                    input = input.Replace(Strings.Events.onlinecountcommand, onlineList.Count.ToString());
                    var sb = new StringBuilder();
                    for (var i = 0; i < onlineList.Count; i++)
                    {
                        
                        sb.AppendLine(onlineList.Name + " Lv: " + onlineList.Level + (i != onlineList.Count - 1 ? " | " : "") );
                       
                        

                        
                    }

                    input = input.Replace(Strings.Events.onlinelistcommand, sb.ToString());
                }

 

This is code of command "\onlinelist"

How to sort Level and player ( no need online) ?? thank

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...