21.07.2017, 00:43
Hi guys, I have two ways to use timer:
1. ptask
2. task with foreach loop
I wanna know which one is faster to use, please help me. Thank you!
1. ptask
PHP код:
ptask UpdateTime[10000](playerid)
{
new time0, time1, time2;
gettime(time0, time1, time2);
SetPlayerTime(playerid, time0, time1);
return 1;
}
PHP код:
task UpdateTime[10000]()
{
foreach(new i: Player)
{
new time0, time1, time2;
gettime(time0, time1, time2);
SetPlayerTime(playerid, time0, time1);
}
return 1;
}