SetWorldTime Issue
#1

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
Reply
#2

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

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

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.
Reply
#5

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); ??
Reply
#6

no help here?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)