How to use timer?
#1

Hi, i have seen alot of different timers and stuff, but if i want to use one for like 10 commands what one would u sugest? and could you please demonstrate (show) how you would use it in a command ?

+rep for any help
Reply
#2

its like:
Код:
forward timer1();
new timer1;
timer1 = SetTimer("timer1", 1000, false)
public timer1()
{
    //Code stuff here
    return 1;
}
Reply
#3

pawn Код:
forward MyFunction();
public MyFunction()
{
    //Code
}


if(!strcmp(cmdtext,"/mycommand"))
{
    SetTimer("MyFunction",2000,false); //MyFunction is called after 2 seconds
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)