Change of Time - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Change of Time (
/showthread.php?tid=69116)
Change of Time -
Satalone - 16.03.2009
Hey guys, can you help me? i need help with making a Real Life server. i want to make time Change, for example if it is 17:00 sun will go down
18:00 sun is down like in real Life.
Re: Change of Time -
Mikep - 16.03.2009
https://sampwiki.blast.hk/wiki/Gettime
Re: Change of Time -
Satalone - 16.03.2009
No, i mean like. If ingame it is 12:00 and in real life it is 15:59. When it will be 16:00 i want time ingame to change to 13:00.
Re: Change of Time -
Think - 16.03.2009
Quote:
Originally Posted by Mikep
|
and
https://sampwiki.blast.hk/wiki/SetWorldTime
Re: Change of Time -
Satalone - 16.03.2009
Do you understand what im saying? i know those commands. im asking you, how can i make it so every hour time will change +1. How can i do that?
Re: Change of Time -
Zoopaman - 16.03.2009
use those commands together wisely
Re: Change of Time -
samgreen - 16.03.2009
The bit these two posters are leaving out is that you want to add these functions within a timer that is run every hour. Examine the SetTimer function if you are unfamiliar with it. Keep in mind that the SetTimer function requires the time in
milliseconds, account for this and you should be great.
Re: Change of Time -
Zoopaman - 17.03.2009
Quote:
Originally Posted by samgreen
The bit these two posters are leaving out is that you want to add these functions within a timer that is run every hour.
|
if it's simply run every hour, it won't sync with the local time - just every hour from when you start it.
But yes, you need timers for this.
Re: Change of Time -
Kinetic - 17.03.2009
I have a timer that runs in my script every minute, that is what I have done to update time. it works good to me, although I would love for time to be able to update by the minute rather than hour.