Web Stats

Scotty1207

New Member
Firstly I'd like to say hi, anyway on to the topic, I was wondering how to get web stats for a Bliss private hive server like the ones you find on the DayZ mod homepage like, players alive, bandits alive, bandits killed etc...

Any help would be much appreciated!
 
This can be achieved with a few different MySQL queries. Try these:

Players alive
Code:
SELECT COUNT(`id`) AS 'total' FROM `survivor` WHERE `is_dead` = 0 AND `last_updated` > now() - INTERVAL 30 day; # Live players in last 30 days
 
OR
 
SELECT COUNT(`id`) AS 'total' FROM `survivor` WHERE `is_dead` = 0; # Live players of all time

Bandits alive
Code:
SELECT COUNT(`id`) AS 'total' FROM `survivor` WHERE `is_dead` = 0 AND `model` LIKE '%Bandit%'; # Total live bandits

Bandits killed

Code:
SELECT COUNT(`id`) AS 'total' FROM `survivor` WHERE `is_dead` = 1 AND `model` LIKE '%Bandit%'; # Total live bandits

These are really simple queries that you can probably make sense of and adjust to your liking. You can pull quite a lot of info from the database if you have a look around and figure out where to pull it from. Hope that helps.
 
Back
Top