SA-MP Forums Archive
KillTimer - 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: KillTimer (/showthread.php?tid=557989)



KillTimer - Banditukas - 15.01.2015

Hi,

I set into variable a settimerex id

Код:
if( variable[ playerid ] == -1 )
{
     variable[ playerid ] = settimerex(....);
}
else
{
 KillTimer(variable[ playerid ] );
variable[ playerid ] = -1;
}
and then in public

Код:
forward whentimerex();
public whentimerex()
{
 // some code
variable[ playerid ] = -1;
}
Problem is that when this public is called after some time and if this check (i put this onplayerconnect) will be checked like that

Код:
else
{

}
Then timer get killed important is that how much time i can kill timer after he excecute in public, callback ? because i have more timers in gamemod'e in proccess during time.