Time bug. Please help!
#1

Hello Everyone!

I have this code:
http://pastebin.com/m41bedf5e

But there is a bug. When it's Tuesday, the hour won't be zeroed. It's flashing, because it's sync the time in every 1sec.

For example:

25:01 then sync it - 01:02

I hope you understand it ^^

Please help me! Thanks.

bpeterson
Reply
#2

bump
Reply
#3

pawn Код:
new d, h, m, weekdays[][] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" };

public TimeUpdate()
{
  if (m > 59) m = 0, h ++;

  if (h > 23) h = 0, d ++;
   
  if (d > 6) d = 0;
     
  printf("[TimeUpdate] %s, %02d:%02d", weekdays[d], h, m);

  for (new i = 0; i < MAX_PLAYERS; i ++) SetPlayerTime(i, h, m);

  m ++;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)