PDA

View Full Version : Highest players per day


Alexander_123
09/01/2012, 07:24 PM
Hi!
I want a script like if a player come in my server ( suppose 15 players) it should record.
It should save everyday.Can anyone give me script like that?

MR,Mr
09/01/2012, 09:12 PM
Top of GM/FS
new players = 0;//This stores the current players value
new topplayers = 0;//This stores the highest players so far
forward GetTopPlayers();

Under OnPlayerConnect

++players;//increase the connected players by 1
if(players > topplayers)//If there are more players in the server than the current topplayers
{
topplayers = players;//topplayers = currentplayers
} -- As per vinces post, this can go here instead.

Under OnPlayerDisconnect

--players;//Decrease the connected players by 1



If I am correct, this should work (not tested)

However, this will just store a value inside the script, nothing is done with it yet. Where do you want the top players for the day to be stored?

Vince
09/01/2012, 09:23 PM
You don't need the timer. You can just perform that check when a player connects (after you've increased the players variable).

MR,Mr
09/01/2012, 09:24 PM
You don't need the timer. You can just perform that check when a player connects (after you've increased the players variable).

This is true, I'm not very efficient in my coding tonight ;)