[ServerList] Add playerCount command to see how many players there are
This commit is contained in:
parent
0d5ce55b54
commit
0c8ba82fba
@ -765,6 +765,17 @@ namespace Components
|
||||
};
|
||||
});
|
||||
|
||||
Command::Add("playerCount", [](Command::Params*)
|
||||
{
|
||||
int count = 0;
|
||||
for(auto server : ServerList::OnlineList)
|
||||
{
|
||||
count += server.clients;
|
||||
}
|
||||
|
||||
Logger::Print("There are %d players playing.\n", count);
|
||||
});
|
||||
|
||||
// Add required ownerDraws
|
||||
UIScript::AddOwnerDraw(220, ServerList::UpdateSource);
|
||||
UIScript::AddOwnerDraw(253, ServerList::UpdateGameType);
|
||||
|
Loading…
Reference in New Issue
Block a user