continuing a timer?
#2

Either you can set a repeated timer or you can call the function every second and make it limited but yet repeated.

1. Setting a Repeated Timer without limits.
pawn Код:
forward function();

SetTimer("function", 1000, true); // Set a repeated timer of 1000 miliseconds (1 second)

public function()
{
    print("Function has been called.");
}

2. Setting a repeated timer with limits.


pawn Код:
forward function(numb);

new no =  20;
new Timer = SetTimerEx("function", 1000, true,"d",no); // Set a repeated timer of 1000 miliseconds (1 second)

public function(numb)
{
    if(numb == 0)
    {
        KillTimer(Timer);
    }
    print("Value:%d");
    numb--;
}
Reply


Messages In This Thread
continuing a timer? - by Elysian` - 02.12.2012, 16:29
Re: continuing a timer? - by Ballu Miaa - 02.12.2012, 16:45
Re: continuing a timer? - by Elysian` - 02.12.2012, 16:57
Re: continuing a timer? - by Elysian` - 02.12.2012, 17:20
Re: continuing a timer? - by Ballu Miaa - 02.12.2012, 17:22
Re: continuing a timer? - by Elysian` - 02.12.2012, 17:23
Re: continuing a timer? - by Calgon - 02.12.2012, 17:27
Re: continuing a timer? - by Ballu Miaa - 02.12.2012, 17:44
Re: continuing a timer? - by Calgon - 02.12.2012, 19:03
Re: continuing a timer? - by Ballu Miaa - 03.12.2012, 09:39

Forum Jump:


Users browsing this thread: 3 Guest(s)