Time Script
#1

Ive made a little time script, now the problem is when its 23:59, then it must jump to 00:00, but instead: It shows 23:59 - 24:00 (This is the problem) - then 00:00

So can somebody show me how to remove the 24:00?
Thnx!

public GameTime(playerid)
{
if(_Time_Hours < 24)
{
if(_Time_Minutes < 59)
{
_Time_Minutes += 1;
} else {
_Time_Hours += 1;
_Time_Minutes = 0;
}
} else {
_Time_Hours = 0;
_Time_Minutes = 0;
_Time_Day += 1;
}

printf("%02d:%02d", _Time_Hours, _Time_Minutes);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)