SA-MP Forums Archive
Time and weather 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: Time and weather problem.. (/showthread.php?tid=550627)



Time and weather problem.. - dundolina - 13.12.2014

Hello need me a something to add in my gamemode and what it's time on my computer to be the time in the game and the weather by the time. Can anyone help me, please?


Re: Time and weather problem.. - SickAttack - 13.12.2014

Don't request scripts in this section.


Re: Time and weather problem.. - Abagail - 13.12.2014

You can use an HTTP request to get the time of a certain time-zone from a website / API, and then set the time / and or weather accordingly. You can ****** for existing scripts like this.


Re: Time and weather problem.. - dundolina - 13.12.2014

I have setworld but it set it too late.. Need me to set the night in 5 PM but it set in 12 PM.. How to fix this?


Re: Time and weather problem.. - Eyce - 14.12.2014

As far as I know, if it's hosted from your own computer, it follows whatever time is set on your computer. If it's hosted, then it follows the time from where it's hosted. Probably, you can subtract from the time. Something like this:

pawn Код:
new hour, minute, second;
gettime(hour, minute, second);

new adjustedhour = hour - 5;
SetWorldTime(adjustedhour);



Re: Time and weather problem.. - Abagail - 14.12.2014

No it doesn't. It gets the servers time, which is as far as I know random. I have researched this, and have found the following results:
https://sampforum.blast.hk/showthread.php?tid=263711
https://sampforum.blast.hk/showthread.php?tid=311464


Re: Time and weather problem.. - Eyce - 14.12.2014

Quote:
Originally Posted by Abagail
Посмотреть сообщение
No it doesn't. It gets the servers time, which is as far as I know random. I have researched this, and have found the following results:
https://sampforum.blast.hk/showthread.php?tid=263711
https://sampforum.blast.hk/showthread.php?tid=311464
Good find.

Off topic: Any other ideas on the thread I posted? - https://sampforum.blast.hk/showthread.php?tid=550615


Re: Time and weather problem.. - dundolina - 14.12.2014

Код:
D:\Shefa\Igri\GTASanAndreasRIP\bam\gamemodes\gangwars4.pwn(14) : fatal error 100: cannot read from file: "GeoIP_Plugin"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Time and weather problem.. - dundolina - 15.12.2014

Help?