02.06.2014, 18:39
(
Последний раз редактировалось Aerotactics; 12.06.2014 в 16:57.
)
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.
13 is the gamehour output, which should correspond to 1 pm on a 12 hour clock, but it doesn't
-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);