SA-MP Forums Archive
SetWorldTime Issue - 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: SetWorldTime Issue (/showthread.php?tid=534265)



SetWorldTime Issue - x4hi - 29.08.2014

I have been trying to set the world time to where when I join my server it is always daytime so i put SetWorldTime(12); and put it under OnGameModeInit() and it seems it isn't setting it no matter what I do. Am I putting it in the wrong place? I have even took it out of OnGameModeInit and put it under OnPlayerConnect and I get the same results. I have even set world time with LuxAdmin and after 1 minute it changes back to dark. I basically want it to stay afternoon the whole time. does anyone know whats wrong with it?

Here is the pastebin:

http://pastebin.com/b5qApMC6


Re: SetWorldTime Issue - SlimDkhili - 29.08.2014

maybe you are sync your server , check if there is any timer/serverheartbeat ... they are maybe controling your game time and weather


Re: SetWorldTime Issue - bensmart469 - 29.08.2014

Should be fine in OnGameModeInit, but you could try SetPlayerTime instead under OnPlayerConnect (or OnPlayerSpawn)
https://sampwiki.blast.hk/wiki/SetPlayerTime


Re: SetWorldTime Issue - x4hi - 29.08.2014

Quote:
Originally Posted by bensmart469
Посмотреть сообщение
Should be fine in OnGameModeInit, but you could try SetPlayerTime instead under OnPlayerConnect (or OnPlayerSpawn)
https://sampwiki.blast.hk/wiki/SetPlayerTime
I just put SetPlayerTime under OnPlayerSpawn and that works, but when a minute passes by it goes dark again.


Re: SetWorldTime Issue - x4hi - 29.08.2014

Quote:
Originally Posted by SlimDkhili
Посмотреть сообщение
maybe you are sync your server , check if there is any timer/serverheartbeat ... they are maybe controling your game time and weather
It does seem that my current time also adjusts to my server time. Is there any way I can freeze time at SetPlayerTime(playerid, 12, 0); ??


Re: SetWorldTime Issue - x4hi - 29.08.2014

no help here?