SA-MP Forums Archive
SetTimer problem - 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: SetTimer problem (/showthread.php?tid=639269)



SetTimer problem - Adain - 14.08.2017

Hello everybody, before I start, I want to say "Sorry for my english"

So, I use an old version of sa-mp (such as sa-mp 0.3e, u2-mp 0.3e ), and I faced a problem connected with SetTimer
Here is code:

Код:
forward TestTimer();
public TestTimer()
{
      for(new i; i < MAX_PLAYERS; i++)
     {
          //here's empty ('cause it's test)
     }
      print("1");
      return 1;
}
After that I create timer

Код:
public OnGameModeInit()
{
      //gamemodetext bla... bla... bla...
      SetTimer("TestTimer", 1000, 1); // Here's you can clearly see that timer 1 sec + repeating
}
But I faced with the problem. As you have seen it must print("1"); just one time per second, but it print it twice per second

http://imgur.com/a/3iWNQ <- 1 second it print double "1", but in TestTimer I only print 1.

Heeeelllpppp friends
---------------------------[ OFFTOP ]---------------------------------
Again sorry for my english, but it makes me feel so f***ing cool, that know english a bit, and can speak. I always try to up my skill. )


Re: SetTimer problem - verlaj - 14.08.2017

Use Y timers.


Re: SetTimer problem - Adain - 14.08.2017

Okay, lately I try to use ******'s timer. But maybe sbs have any idea, how to fix it without any other includes?


Re: SetTimer problem - Adain - 14.08.2017

OMG, I don't know how, but I fixed it. Thanks everybody :P


Re: SetTimer problem - Dayrion - 14.08.2017

Why aren't you using the latest version of SAMP?


Re: SetTimer problem - Adain - 14.08.2017

I'm using samp 0.3e, 0.3z, 0.3.7. Even 0.3e, 0.3z in 2017 have online )