SA-MP Forums Archive
[HELP] Timer bug - 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: [HELP] Timer bug (/showthread.php?tid=155861)



[HELP] Timer bug - Willow - 19.06.2010

Hi, I have problem with timers... they don't call functions! OK, I'll explain.

So I put
Код:
SetTimer("FunctionName", 10000, 0);
under my
Код:
OnPlayerConnect(playerid)
and also I have
Код:
Example[playerid] = 1;
under it.

And ofcourse the function(example):

Код:
forward FunctionName(playerid);
public FunctionName(playerid)
{
    Example[playerid] = 0;
	return 1;
}
The problem is:
Код:
Example[playerid]
is still true after the timer calls function... (It supposed to be false)





Re: [HELP] Timer bug - smeti - 19.06.2010

Use:
pawn Код:
SetTimerEx("FunctionName", 10000, false, "i", playerid);



Re: [SOLVED] Timer bug - Willow - 19.06.2010

Thanks, much appreciated.