SA-MP Forums Archive
Server Time Problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server Time Problem. (/showthread.php?tid=527753)



Server Time Problem. - 0B3Y - 24.07.2014

Hi guys, do you guys know how can i change my server time? Basically, i'm living in Indonesia and my server are hosted in France. So the time isnt same as Indonesia... What i want to do is set the server time to match as Indonesia... Is it possible? Thanks guys... Any reply would be appreciated.


Re: Server Time Problem. - Tadas - 24.07.2014

I founded this link: https://sampforum.blast.hk/showthread.php?tid=70445
I think than that filterscript take time from computer time not from host.


Re: Server Time Problem. - 0B3Y - 24.07.2014

Uhmm... So with that, the time for each players will be diffrent?


Re: Server Time Problem. - nmader - 24.07.2014

pawn Код:
new time, hour, minute, second;
gettime(hour, minute, second);
time = hour + 8;
SetWorldTime(time);
Edit the 8 until it is equal to your timezone, seeing as Indonesia has three timezones I wasn't use which was yours.


Re: Server Time Problem. - 0B3Y - 24.07.2014

Alright thanks man... Btw why do i cant rep someone? :/


Re: Server Time Problem. - nmader - 24.07.2014

Quote:
Originally Posted by 0B3Y
Посмотреть сообщение
Alright thanks man... Btw why do i cant rep someone? :/
Are you clicking a star below the person's name? If so, does it show an error message? If not, can you not see it?


Re: Server Time Problem. - Vince - 24.07.2014

Quote:
Originally Posted by nmader
Посмотреть сообщение
pawn Код:
new time, hour, minute, second;
gettime(hour, minute, second);
time = hour + 8;
SetWorldTime(time);
Edit the 8 until it is equal to your timezone, seeing as Indonesia has three timezones I wasn't use which was yours.
Except when it's 11PM in France, in which case you will end up with 31 (23 + 8) ... So all in all:
pawn Код:
time = (hour + 8) % 24;



Re: Server Time Problem. - 0B3Y - 24.07.2014

Quote:
Originally Posted by nmader
Посмотреть сообщение
Are you clicking a star below the person's name? If so, does it show an error message? If not, can you not see it?
Yes i'm clicking it... And a message appears. I wrote "thanks" And Click Approve. Done. But nothing happend with your rep. :/

Quote:
Originally Posted by Vince
Посмотреть сообщение
Except when it's 11PM in France, in which case you will end up with 31 (23 + ... So all in all:
pawn Код:
time = (hour + 8) % 24;
Alright... Thanks for the corrections


Re: Server Time Problem. - nmader - 24.07.2014

Quote:
Originally Posted by Vince
Посмотреть сообщение
Except when it's 11PM in France, in which case you will end up with 31 (23 + ... So all in all:
pawn Код:
time = (hour + 8) % 24;
Genius, I didn't know you could do that so simply, thanks for correcting me as I am now smarter!
Quote:
Originally Posted by 0B3Y
Посмотреть сообщение
Yes i'm clicking it... And a message appears. I wrote "thanks" And Click Approve. Done. But nothing happend with your rep. :/
Don't worry about it. I'm here to help you, rather than rep, which is just a perk!


Re: Server Time Problem. - 0B3Y - 24.07.2014

Quote:
Originally Posted by nmader
Посмотреть сообщение
Genius, I didn't know you could do that so simply, thanks for correcting me as I am now smarter!

Don't worry about it. I'm here to help you, rather than rep, which is just a perk!
Alrighty