SetWorldTime issue.
#1

In my script, I've modified the gl_realtime to be a custom time speed, however, when I try to set the server time to the hour, 1am - 12pm work fine, but at 1 pm, the time sets to night again, and from 1pm to 12am, the time acts as if it were 1am - 12pm. This was supposed to be a straightforward script, but it's just not.

-gamehour is the setworldtime hour
-IsMorning is a bool for am/pm

EDIT: To clarify, I'm not looking for a script re-write. I simply want to know why this isn't working the way it should. The problem still exists.

This script is in a clock.
pawn Код:
minute++;
if(minute == 60)
{
    minute = 0;
    hour++;
    gamehour++;
}
if(hour == 12 && minute == 0)
{
    if(IsMorning == true){IsMorning = false;}
    else{IsMorning = true;}
}
if(hour == 13){hour = 1;}
if(gamehour == 24){gamehour = 0;}
if(gamehour == 0 && minute == 0){day++;}
if(day == 7){day = 0;}
SetWorldTime(gamehour);
13 is the gamehour output, which should correspond to 1 pm on a 12 hour clock, but it doesn't


Reply


Messages In This Thread
SetWorldTime issue. - by Aerotactics - 02.06.2014, 18:39
Re: SetWorldTime issue. - by Threshold - 02.06.2014, 22:21
Re: SetWorldTime issue. - by Aerotactics - 03.06.2014, 00:10
Re: SetWorldTime issue. - by Aerotactics - 03.06.2014, 06:37
Re: SetWorldTime issue. - by Threshold - 03.06.2014, 12:32
Re: SetWorldTime issue. - by Aerotactics - 04.06.2014, 14:41
Re: SetWorldTime issue. - by Dignity - 04.06.2014, 15:04
Re: SetWorldTime issue. - by Aerotactics - 10.06.2014, 22:04
Re: SetWorldTime issue. - by Threshold - 10.06.2014, 22:14
Re: SetWorldTime issue. - by Aerotactics - 10.06.2014, 22:16

Forum Jump:


Users browsing this thread: 1 Guest(s)