06.11.2012, 17:59
Introduction
Hello. This simple library contains a function to retrieve the average of players over a particular time.
How does it work
You can choose to calculate a new player average each second, minute, or hour. Modify the define "TIME_USED" in the include if you'd like to change the default (= each second). It even saves the average when you shut down your server (it saves the amount of checks, and the total amount of players. Average is calculated by dividing the players with the amount of checks using floatdiv).
You can retrieve the average by using the function 'GetServerAveragePlayers()'. This returns a float, the average calculated players.
Download
Click here to download version 1
Is there anything you need to know?
Yeah, credits to Dracoblue for Dini. Also, I planned to make all measures of central tendency in the future (average, mode, median). For now you have the first one.
Jochem
Hello. This simple library contains a function to retrieve the average of players over a particular time.
How does it work
You can choose to calculate a new player average each second, minute, or hour. Modify the define "TIME_USED" in the include if you'd like to change the default (= each second). It even saves the average when you shut down your server (it saves the amount of checks, and the total amount of players. Average is calculated by dividing the players with the amount of checks using floatdiv).
You can retrieve the average by using the function 'GetServerAveragePlayers()'. This returns a float, the average calculated players.
Download
Click here to download version 1
Is there anything you need to know?
Yeah, credits to Dracoblue for Dini. Also, I planned to make all measures of central tendency in the future (average, mode, median). For now you have the first one.
Jochem