As the title states, I would like to know, if there is an option to exclude admins from the online player count. If not, can this please be added (as an option)?
Excluding admin in online player count?
This would be handy yes
@Goldie I've looked at the code and implemented it. It's quite an easy fix fortunately.
Simply change line 2726 from:
Simply change line 2726 from:
panelText.Content = $"{BasePlayer.activePlayerList.Count}/{ConVar.Server.maxplayers}";to:panelText.Content = $"{BasePlayer.activePlayerList.Count(x => !x.IsAdmin)}/{ConVar.Server.maxplayers}";HTH
Higgins
Higgins@Goldie I've looked at the code and implemented it. It's quite an easy fix fortunately.
Simply change line 2726 from:to:panelText.Content = $"{BasePlayer.activePlayerList.Count}/{ConVar.Server.maxplayers}";panelText.Content = $"{BasePlayer.activePlayerList.Count(x => !x.IsAdmin)}/{ConVar.Server.maxplayers}";HTH
Higgins
thanks!
Does this still work?
It still works fine.
At this moment you will find the line to change at 2922 in your plugins folder (InfoPanel.cs)
From:
var panelText = (IPanelText)panel.Value["OPlayersText"];
panelText.Content = $"{BasePlayer.activePlayerList.Count}/{ConVar.Server.maxplayers}";
panelText.Refresh();
to:
var panelText = (IPanelText)panel.Value["OPlayersText"];
panelText.Content = $"{BasePlayer.activePlayerList.Count(x => !x.IsAdmin)}/{ConVar.Server.maxplayers}";
panelText.Refresh();