09.10.2015, 16:10
Hi guys,
I made a count down like 300 seconds ( 5 minutes ) but it shows ingame how many seconds that are left so fom 300 to 0. What I want is that it shows the minutes : seconds e.g. 04:49 . How can I fix it?
My codes:
Peace
I made a count down like 300 seconds ( 5 minutes ) but it shows ingame how many seconds that are left so fom 300 to 0. What I want is that it shows the minutes : seconds e.g. 04:49 . How can I fix it?
My codes:
PHP Code:
// Counter
CountDownFromAmount = 300; // 5minutes
SetTimer("CountDownTimer", 999, 1);
PHP Code:
new CountDownFromAmount;
forward CountDownTimer();
PHP Code:
public CountDownTimer()
{
CountDownFromAmount--;
new string[128];
format(string, 128, "%d", CountDownFromAmount);
TextDrawSetString(Text:MissionCount, string);
TextDrawShowForAll(Text:MissionCount);
if (CountDownFromAmount == 0)
{
GameTextForAll("", 3000, 5);
}
return 1;
}