05.11.2015, 14:45
Time units are relative and any unit can be converted to another. It is common knowledge that a minute is 60 seconds. Hence, 5 minutes is 5 x 60 = 300 seconds. So why two variables?
It then becomes:
Obviously set TimeS to 300 seconds (= 5 minutes).
It then becomes:
PHP код:
forward UpdateTime();
public UpdateTime()
{
if(--TimeS <= 0)
{
KillTimer(Time);
}
new Str[34];
format(Str, sizeof(Str), "%02d:%02d", TimeS / 60, TimeS % 60);
TextDrawSetString(Textdraw0, Str);
return 1;
}