09.04.2017, 12:04
Hi Guys
i Have Small Problems
my timer textdraw when i use it first time countdown working perfect
next time for me or another player using it countdown #Fast why ? not countdown with 1sec || countdown with 3secs or more in 1sec why ?
+rep
i Have Small Problems
my timer textdraw when i use it first time countdown working perfect
next time for me or another player using it countdown #Fast why ? not countdown with 1sec || countdown with 3secs or more in 1sec why ?
PHP код:
stock CreateTimerText()
{
CountDownTime = 5 * 60 + 10;
CountDownTimer = SetTimer("counttimer",1000,true);
}
forward counttimer(playerid);
public counttimer(playerid)
{
if(CountDownTime <= 0)
{
CountDownTime = -1;
//TextDrawSetString(TextDraw1, "Mission Failed");
CPfailed(playerid);
KillTimer(CountDownTimer);
}
else
{
CountDownTime--;
new msg[15];
format(msg, sizeof(msg), "%i:%i", CountDownTime/60, CountDownTime%60);
TextDrawSetString(Textdraw1, msg);
}
return 1;
}
PHP код:
Textdraw1 = TextDrawCreate(537.000000, 327.000000, "05:10");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.330000, 1.200000);
TextDrawColor(Textdraw1, -554567169);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetSelectable(Textdraw1, 0);