which is better ? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: which is better ? (
/showthread.php?tid=251810)
which is better ? -
Edga - 28.04.2011
ok, so i was wondering which is more efficient to use ?
Quote:
forward Callback(playerid);
public Callback(playerid);
{
// action
SetTimerEx("Callback", 300, false, "i", playerid);
return 1;
}
|
OR just this here...
Quote:
SetTimerEx("Callback", 300, true, "i", playerid);
|
I am asking this because i find this here
Quote:
SetTimerEx("Callback", 300, true, "i", playerid);
|
really glitchy because even if under
"CallBack" i add
if(IsPlayerConnected) or
killtimer after the person logs out it still keeps on going and eventually my server crash's but the first method works perferctly ! althought i am not sure if its better to use.
So i am asking you people which one is better to use ?
Re: which is better ? -
Sensitive - 28.04.2011
First.
Re: which is better ? -
Mean - 28.04.2011
Second method INDEED.
The problem is that you never kill the timer when player leaves. I guess that's the prob, in KillTimer, did you create a new variable for the timer?
Re: which is better ? -
Edga - 28.04.2011
i have i even added 3 same killtimers but its still going after you log out...