Jump to content

Get current server stats (number of players)


Kallb123

Recommended Posts

You can check the servers through the Steam server list if you are hosting on a Steam version.
Go to your Steam client.
On the upper left part of the Steam window click "View" > Servers > Game > Select Project Zomboid

Link to comment
Share on other sites

In the absence of an api, a quick and dirty solution was to count matching lines in the log file. It seems to have worked quite well over the last few days. 

 

echo $(( $(grep ' connected' /path/to/Zomboid/Logs/*user.txt | wc -l) - $(grep 'disconnected' /path/to/Zomboid/Logs/*user.txt | wc -l) )) > /path/to/output.txt

Link to comment
Share on other sites

  • 2 weeks later...

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...