SA-MP Forums Archive
Changing time difference ??? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Changing time difference ??? (/showthread.php?tid=56054)



Changing time difference ??? - super-sergio16 - 23.11.2008

Hello, Someone can tell me how to change the hour of my server to +1?

Ex: 16:00 -> 17:00

Sorry my English




Re: Changing time difference ??? - Zoopaman - 23.11.2008

generally you have to add 1 hour after gettime

what gamemode is this for?


Re: Changing time difference ??? - super-sergio16 - 23.11.2008

Use the GodFather

What can I change?


Re: Changing time difference ??? - Serbish - 23.11.2008

What I am using for example:


if (hour == 0)
{
SetWorldTime(1);
}
if (hour == 1)
{
SetWorldTime(2);
}

etc.


Re: Changing time difference ??? - Badger(new) - 23.11.2008

new hour = Gettime or whatever its called;

SetWorldTime(hour+1);


Re: Changing time difference ??? - Zoopaman - 23.11.2008

my approach was similar to Badger's - I too simply added +1, only here:

public FixHour(hour)
{
hour = timeshift+hour+1;
if (hour < 0)
{
hour = hour+24;
}
else if (hour > 23)
{
hour = hour-24;
}
shifthour = hour;
return 1;
}


Re: Changing time difference ??? - super-sergio16 - 24.11.2008

GOOOD!!!