overall online time on server - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: overall online time on server (
/showthread.php?tid=648084)
overall online time on server -
wallen - 15.01.2018
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.
Re: overall online time on server -
grymtn - 15.01.2018
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.
Re: overall online time on server -
RowdyrideR - 15.01.2018
Did you mean a timer for the player online time or the whole server up time