[UNSOLVED] TextDraw Countdown
#1

Hello! I need help with count down showing in textdraw.
I got following.

Код:
public OnPlayerEnterCheckpoint(playerid)
{
	if(GetPlayerTeam(playerid) == TEAM_HOODIES)
	{
	  new string[256], playername[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, playername, sizeof(playername));
		format(string, sizeof(string), "%s is stealing money. It takes to take 10 seconds.", playername);
		TextDrawSetString(text3, string);
		TextDrawHideForAll(text4);
		TextDrawShowForAll(text3);
		SetTimer("Destroy3", 2000, false);
		man[playerid] = 1;
		plant = SetTimer("Planted", 10000, false);
	}
	return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
	if(GetPlayerTeam(playerid) == TEAM_HOODIES)
	{
	  new string[256], playername[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, playername, sizeof(playername));
	  format(string, sizeof(string), "%s has quit stealing money.", playername);
	  KillTimer(plant);
		TextDrawSetString(text4, string);
		TextDrawHideForAll(text3);
		TextDrawShowForAll(text4);
		SetTimer("Destroy4", 2000, false);
		man[playerid] = 0;
	}
	return 1;
}
forward Planted();
public Planted()
{
  for(new i=0; i<MAX_PLAYERS; i++)
	{
	  timedeliver = 30;
 		DisablePlayerCheckpoint (i);
 		plant = SetTimer("UpdateTime", 1000, true);
	}
}
forward UpdateTime();
public UpdateTime()
{
	timedeliver--;
	new string[256];
	format(string, sizeof(string), "%i seconds until money is delivered.", timedeliver);
	TextDrawSetString(text19, string);
	TextDrawShowForAll(text19);
	if(timedeliver == 0)
	{
	  KillTimer(plant);
	  format(string, sizeof(string), "Money was succesfully delivered.", timedeliver);
		TextDrawSetString(text19, string);
		TextDrawShowForAll(text19);
		SetTimer("AttackWin", 2000, false);
	
	}
	

}
After played stayed in CP for 10 seconds timer don't go '30 seconds till money is delivered.', '29 seconds till money is delivered.', '28 seconds till money is delivered.'. It goes '0 seconds till money is delivered.', ''
-100 seconds till money is delivered.', '-2000 seconds till money is delivered.' and it is not stopping. Anyone can help to make it like '30 seconds till money is delivered.', '29 seconds till money is delivered.', '28 seconds till money is delivered.' till 0.
Thanks.
Reply


Messages In This Thread
[UNSOLVED] TextDraw Countdown - by Ironboy500 - 24.06.2010, 18:52
Re: [UNSOLVED] TextDraw Countdown - by Ironboy500 - 24.06.2010, 19:03
Re: [UNSOLVED] TextDraw Countdown - by ReVo_ - 24.06.2010, 19:08
Re: [UNSOLVED] TextDraw Countdown - by Ironboy500 - 24.06.2010, 19:09
Re: [UNSOLVED] TextDraw Countdown - by ReVo_ - 24.06.2010, 19:15
Re: [UNSOLVED] TextDraw Countdown - by Ironboy500 - 24.06.2010, 19:22

Forum Jump:


Users browsing this thread: 1 Guest(s)