Saving timer when player logs off ?
#5

Okay,so firstly there must be a place you create your timer. Player spawn etc. Or connect.


You didn't tell if it's a global timer or not,so I assume it's a timer stored per player? If not,tell me.
What you must do is this:

pawn Код:
new StatSaverTimer[MAX_PLAYERS]; // MAX_PLAYERS must be defined.

Wherever your Timer starts,you must do this:

StatSaverTimer[playerid] = SetTimerEx(....); // so this is where your timer starts.
Then,you must put this under OnPlayerDisconnect.

pawn Код:
KillTimer(StatSaverTimer[playerid]); // kill the timer,so it will stop counting
Reply


Messages In This Thread
Saving timer when player logs off ? - by Black Axe - 28.04.2013, 11:51
Re: Saving timer when player logs off ? - by LetsOWN[PL] - 28.04.2013, 11:56
Re: Saving timer when player logs off ? - by Black Axe - 28.04.2013, 12:06
Re: Saving timer when player logs off ? - by LetsOWN[PL] - 28.04.2013, 12:20
Re: Saving timer when player logs off ? - by Tamer - 28.04.2013, 12:20
Re: Saving timer when player logs off ? - by LetsOWN[PL] - 28.04.2013, 12:29
Re: Saving timer when player logs off ? - by Black Axe - 28.04.2013, 12:31
Re: Saving timer when player logs off ? - by Tamer - 28.04.2013, 12:32
Re: Saving timer when player logs off ? - by LetsOWN[PL] - 28.04.2013, 12:35
Re: Saving timer when player logs off ? - by RVRP - 28.04.2013, 12:36

Forum Jump:


Users browsing this thread: 1 Guest(s)