overall online time on server
#1

Just im stuck at this stuff, looks easy to do but whatever i do it's just giving errors deleted everything, can you give me the basics on how make a online time on sv with saving file with y_ini?

with the command /stats.
Reply
#2

Anywhere in your script:
Код:
new totaltime[MAX_PLAYERS];
Under OnGameModeInıt
Код:
SetTimer("lookimupthismuch",1000,1);
Somewhere free on your script
Код:
Public lookimupthismuch()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        totaltime[i]++;
    }
}
Then save that variable for that player and you can show it with getdate or gettime or however you like to with creating another command.

EDIT: also don't forget to forward your freshly created public too.
Reply
#3

Did you mean a timer for the player online time or the whole server up time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)