Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

SetTimer problem

$
0
0
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:

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

Code:

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. )

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>