02.02.2009, 20:20
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.
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.
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.");
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.