Suggestion: Add a Chat Command Parameter to view a specific PageSuggestion

If you have the Info Panel with different tabs, make a parameter to open the Server Info with a specific tab.

For example: /info rules
Will open the Tab called rules

Regards

Or even better: That there can be Alias Configured to open specific Tabs.

Like /rules
Will open the Tab called rules



Merged post

If some one is interested, i added a few lines of code which will allow to open a specific Tab when passing with the Chat Command:

 

/info 1
Will open the Tab with the ID 1

/info
Will work normally


If you use something like Alias System you can add an alias like this:

    {
      "original": "/info 3",
      "alias": "/help",
      "originaltype": "chat",
      "aliastype": "chat",
      "permission": "aliassystem.use"
    }

 

Lines to change

Under

        [ChatCommand("info")]
        private void ShowInfo(BasePlayer player, string command, string[] args)


Change

var tabToSelectIndex = _settings.TabToOpenByDefault;


To

            var tabFirstIndex = _settings.TabToOpenByDefault;
            var tabToSelectIndex = tabFirstIndex;
            int tabtoSelectArgumentIndex = 0;
            if (args.Count() == 1) {
                if (int.TryParse(args[0], out tabtoSelectArgumentIndex)) {
                    tabToSelectIndex = tabtoSelectArgumentIndex;
                    PlayerActiveTabs[player.userID].ActiveTabIndex = tabtoSelectArgumentIndex;
                }
            }