[Little helper] Timers.
#1

Hey,
So let's start from that, I am not really good on mathematics and timers use miliseconds.
So who ain't so good on mathematics better read it
And just some people were asking me about that :P
Let's start from a simple timer.
pawn Код:
#include <a_samp>
public OnFilterScriptInit() SetTimer("AutoMsg", 1000 * 60 * 90, true); // We use this timer, What works like regular mathematics, Like 2 * 2 = 4 ;), So. The 1000 on AutoMsg are the milliseconds, the number 60 means 60 seconds per a minute (60 = one minute) and 90 means the minutes, So it works like every 90 minutes an auto message will be sent to all. You can make it like 30 so it sends the message every 30 minutes.
forward AutoMsg();
public AutoMsg SendClientMessageToAll(0xe9e6b9FF, This auto message will be sent every 90 minutes.");
Maybe people think it's useful, Maybe not.
I just want to help for who isn't so good in mathematics, So he probably has some problems with timers, Like I had.

Now if you want 30 seconds for example. Not minutes.
You just do like
SetTimer("TimerName",1000*30,true);
So it's 30 seconds at all.
60 seconds is like
SetTimer("TimerName",1000*60,true);
All this instead of doing
SetTimer("TimerName, 60000, true);
I think the multiplication is better.
Hope I helped to who had problems.
Reply
#2

why don't u use the milisecond converter? it's very easy to use. here's a shot :
[img width=960 height=768]http://i356.photobucket.com/albums/oo6/unnamed_007/we.jpg[/img]
Reply
#3

AlExAlExAlEx what happen to good old brain power . You do know if you don't exercise your brain it goes to mush and you end up like a shabbling, dribbling vegetable stumbling through the forums. Like me *slurp*.
Reply
#4

Quote:
Originally Posted by ♦۞pкžп§-шŧųĄ۞♦
AlExAlExAlEx what happen to good old brain power . You do now if you don't exercise your brain it goes to mush and you end up like a shabbling, dribbling vegetable stumbling through the forums. Like me *slurp*.
i got 5 at math i don't need more xD i have 10 at english ^^
Reply
#5

Nice tooic^^
[/quote]
i got 5 at math i don't need more xD i have 10 at english ^^
[/quote]
Wow too low,10 is the perfect achievement?Our country is 150 and no one able to get 150,,too toooooo difficult:(
Reply
#6

Cool thread.

Good explanation, but im lazy as all hell, and would use the milli second converter. :P
Reply
#7

Oh, I never heard about the miliseconds converter
Reply
#8

Quote:
Originally Posted by ssǝן‾ʎ
Just use maths like in the first post. If you want a 5 year timer do:

pawn Код:
SetTimer("", 1000 * 60 * 60 * 24 * 365, 0);
And let the compiler sort it out for you.
Hheh.
******, Why is the 24?
What's that mean?..
It's like, 365 = days, shouldn't there be any '5' there?
as 5 years?
Reply
#9

Ok, I forgot that ;o
Reply
#10

I just use ******.

e.g. "10 s in ms"

or "454 x 54534"

or "10 USD in GBP"

etc etc
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)