Timer running after logout
#1

So alright Ive set up a small timer that repeats itself every 5 minutes, the problem is the timer doesnt actualy stop when you logout

PHP код:
SetTimerEx("SavePlayerAccountTimer",300000,true,"i",playerid);
forward SavePlayerAccountTimer(playerid);
public 
SavePlayerAccountTimer(playerid) {
    
SavePlayerAccount(playerid);
    
Msg(playerid,COLOR_RED,"Your account has been automaticly saved");
    print(
"hi");
    return 
true;

How do I know its a timer? Ive set up a small print there, its being called every 5 minutes no matter if you logged off or not

Now there are no problems with SavePlayerAccount which I use all the time, but the timer itself tends to run eventho you arent online

I know simple resolution would be to check if he is online or not and the if false to kill the timer, or just kill in under OnPlayerDisconnect, but why does it happen?


EDIT: Just to add up, of course it starts when you login and then just works no matter if you are there or not
Reply


Messages In This Thread
Timer running after logout - by TwinkiDaBoss - 30.12.2015, 01:35
Re: Timer running after logout - by SnG.Scot_MisCuDI - 30.12.2015, 01:47
Re: Timer running after logout - by TwinkiDaBoss - 30.12.2015, 01:50
Re: Timer running after logout - by Jefff - 30.12.2015, 02:00
Re: Timer running after logout - by Richie© - 30.12.2015, 02:02
Re: Timer running after logout - by thefirestate - 30.12.2015, 02:07
Re: Timer running after logout - by TwinkiDaBoss - 30.12.2015, 02:27
Re: Timer running after logout - by PrO.GameR - 30.12.2015, 09:38

Forum Jump:


Users browsing this thread: 1 Guest(s)