2 timers
#1

Hi,

If i call 2 timers
new bool:Waitforscripts;
Код:
SetTimer("hello", 5000, false );
SetTimer("hello", 5000, false );

forward hello( );
public hello( );
{
   if( Waitforscripts == false )
{
   Waitforscripts = true;

SendClientMessageToAll("HELLO", -1 );

}
Waitforscripts = false;
}
What will call first? and codes in this public hello will by completed by one timer first and then second? because i want that both timer send message, but how you see Waitforscripts is setting and waiting until script is ending letting other public hello send that, so important that timer is watiing until other timer public will by completed or no it can by instantly called
Reply
#2

Timers aren't all that accurate, so the timer that has a random smaller interval will be called first. If you want a timer to be called after another one, set a timer to run after the first timer is called (inside its public function).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)