27.01.2013, 17:23
Hey, i have a code's and.. i think they really good.?
but when i do /StartGame
The Timer Is Get Furious .. Thats Changing To 9000, -17:55... like that.
code's :
Code When i Do StartGame.. That What Happens.
So.. What To Do ..?
but when i do /StartGame
The Timer Is Get Furious .. Thats Changing To 9000, -17:55... like that.
code's :
PHP код:
new GameSeconds = 59;
new GameMinutes = 14;
PHP код:
forward CountDownTD();
public CountDownTD()
{
GameSeconds--;
new TimeString[14];
format(TimeString,sizeof(TimeString),"%d:%d",GameMinutes,GameSeconds);
TextDrawSetString(Textdraw0,TimeString);
if(GameSeconds == -1)
{
GameMinutes--;
GameSeconds = 59;
format(TimeString,sizeof(TimeString),"%d:%d",GameMinutes,GameSeconds);
TextDrawSetString(Textdraw0,TimeString);
}
if(GameMinutes == 0)
{
GameSeconds = 0;
SetTimer("GameTime", 1000, 0);
}
return 1;
}
PHP код:
forward CountDown();
public CountDown()
{
if(CD_SECONDS > 0)
{
format(str, sizeof(str), "The Game Start In : ~r~ %d", CD_SECONDS--);
GameTextForAll(str, 1000, 3);
}
else
{
GameTextForAll("~b~GO ! ~r~GOOD LUCK", 1000, 3);
for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) TogglePlayerControllable(i,1);
for(new i; i < MAX_PLAYERS; i++)
if(GameStart == 1)
{
SetTimer("CountDownTD",1000,1);
}
KillTimer(CD_TIMER);
}
}