Timer countdown with textdraws
#1

I have a timer - http://i.imgur.com/4NKcsN2.jpg But i want to make it dynamic to countdown. Now it only shows and then disapears.

Код:
stock CountDown(playerid, time)
{
	CountDownTime[playerid] = time;
	CTimer[playerid] = SetTimerEx("CountDownTimer", 1000, false, "i", playerid);
	return 0;
}
forward CountDownTimer(playerid);
public CountDownTimer(playerid)
{
	if(CountDownTime[playerid] > 1)
	{
		new timer[28];
		format(timer, sizeof(timer), "%i Seconds", CountDownTime[playerid]);
		GameTextForPlayer(playerid, timer, 1000, 0);
		CountDownTime[playerid] -= 1;
		return 1;
	}
	else
	{
		GameTextForPlayer(playerid, "GOOOOO!!!!", 1000, 0);
		KillTimer(CTimer[playerid]);
	}
	return 1;
}
This is the code. And if you can help me to set it up on the top of the screen it will be very nice.
Reply


Messages In This Thread
Timer countdown with textdraws - by Zloto - 06.05.2015, 09:57
Re: Timer countdown with textdraws - by Konstantinos - 06.05.2015, 10:03
Re: Timer countdown with textdraws - by 036 - 06.05.2015, 10:05
Re: Timer countdown with textdraws - by Zloto - 06.05.2015, 10:18

Forum Jump:


Users browsing this thread: 1 Guest(s)