SetTimerEx Problem
#4

Quote:
Originally Posted by yeswecanchange09
Quote:
Originally Posted by Jefff
I appreciate the response but its not quite what I'm trying to get at, basically the problem is with the timer, if the timers already running, and its called again, it will never allow you to kill it again. If you try that simple little script on my first post on an empty gamemode you will see what I mean. Yes, I could try to avoid this by only allowing them to use the command once until the timer stops, but for the use I need it for I need them to be able to use it as much as possible.

Kind of difficult to explain, I hope I clarified the question.
I understand and this is normal
example
Код:
testtimer[playerid] = SetTimerEx("Test",2000,1,"i",playerid); // Timer return 1 so testtimer[playerid] = 1;
U type command second time
Код:
testtimer[playerid] = SetTimerEx("Test",2000,1,"i",playerid); // Timer return 2 so testtimer[playerid] = 2;
U type command third time
Код:
testtimer[playerid] = SetTimerEx("Test",2000,1,"i",playerid); // Timer return 3 so testtimer[playerid] = 3;
Код:
...
	}
	else
	{
		KillTimer(testtimer[playerid]); // it kills testtimer[playerid] = 3, so testtimer[playerid] = 1 and 2 are stil calling
		TestStuff[playerid]=0;
		SendClientMessage(playerid,COLOR_YELLOW,"TEST: Timer Killed");
		return 1;
	}
}
Reply


Messages In This Thread
SetTimerEx Problem - by yeswecanchange09 - 14.06.2010, 20:02
Re: SetTimerEx Problem - by Jefff - 14.06.2010, 20:30
Re: SetTimerEx Problem - by yeswecanchange09 - 14.06.2010, 20:44
Re: SetTimerEx Problem - by Jefff - 14.06.2010, 20:53

Forum Jump:


Users browsing this thread: 1 Guest(s)