Calculate day long
#1

Hi,

I need to make set worldtime by real time, but problem is in summer day is longer winter day is shorter and time need to set by this. But easy by that if server automatic calculate summer/winter/spring/autumn day, night long and set time
Reply
#2

try this filterscript:-
https://sampforum.blast.hk/showthread.php?tid=444070
Reply
#3

Use gettime and set the time after that, it returns hours, minutes and seconds from your computer's clock.
So if you have the computer clock right after summer/winter times, the ingame clock will be so too.
Example using SetWorldTime:
pawn Код:
public TimeUpdate()
{
    new hour;
    gettime(hour);
    SetWorldTime(hour);
}
Although SetWorldTime can only set the hour, if you want to be more precise, you can use SetPlayerTime with a loop, then you can both set minutes and hours.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)