Is this timer faster or same - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is this timer faster or same (
/showthread.php?tid=632007)
Is this timer faster or same -
coool - 08.04.2017
Hello,
I have a timer but two ways of it to script, just figuring out that the first way is faster or not.
The First way: I inherit the declared pvid into the timer.
PHP код:
new pvid = GetPlayerVehicleID(playerid);
SetTimerEx("Example", 1000, 1, "i", pvid);
The Second Way:
PHP код:
SetTimer("Example", 1000, 1);
public Example()
{
new pvid = GetPlayerVehicleID(playerid); //just an example I know it won't work
}
Re: Is this timer faster or same -
TYDS - 08.04.2017
i think you should do a test, use both way to print a message on the console
Re: Is this timer faster or same -
DuyDang2412 - 08.04.2017
I think the first would be more faster because the second will create a variable and store a value into it everytime you call.