Settimer
#1

Hey guy!
I want to ask a question about timer time. If there can be any lags when checkpoint time is set to 1? Like when someone is in car or on foot the chekpoint is visible all the time.
pawn Код:
SetTimer("Stuff goes here", 1, 1);
Thanks!
Reply
#2

well, you don't need 1 ms, you need like 1 second (1000ms).
Reply
#3

First,you have to add a variable for timer in this format:
Код:
forward TimersName (playerid);
Than,add a timer in a command,or somewhere else:
Код:
SetTimer("TimersName",10000,0); // 10000 is number of miliseconds,after that timer is active (1000ms -10 seconds)
After that,just add 0


At last,you have to add new public at end of your script:

Код:
public TimersName(playerid)
{
// Do something here,what will happen,after 10 seconds..
return 1;
}
Reply
#4

Quote:
Originally Posted by ComiGF
Посмотреть сообщение
First,you have to add a variable for timer in this format:
Код:
forward TimersName (playerid);
Than,add a timer in a command,or somewhere else:
Код:
SetTimer("TimersName",10000,0); // 10000 is number of miliseconds,after that timer is active (1000ms -10 seconds)
After that,just add 0


At last,you have to add new public at end of your script:

Код:
public TimersName(playerid)
{
// Do something here,what will happen,after 10 seconds..
return 1;
}
Thanks for explanation dude! I know how it works. Im just wondering if i set time to 1ms it can cause a lags?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)