Very basic time and weather sync.
Since there’s quite a lot of people requesting this simple script, and I’ve not had the time to merge it into my vBasic script, I thought I’d release it as a separate script instead.
/time <hour> <minutes>
/freezetime (New in v1.2.0)
/freezeweather (new in v1.3.0)
/blackout (new in v1.3.0)
Edit the Admins list in the vs_server.lua, add the player identifiers of the players that should have access to the commands in there.
That’s it, there’s nothing else to configure.
Download / Source
If you have a custom chat resource, the commands may not work correctly. In that case use the server console instead, or preferably switch back to the regular FiveM chat!
Time is now synced with GTA:O time by default. You can still override it like usual.
+. Added Dynamic Weather changes. By default weather changes every 10 minutes (this feature can be enabled/disabled by either enabling/disabling it in the config, or using `/freezeweather`). Weather changes according to a realistic weather pattern. If you change the weather using the /weather command, and Dynamic Weather is enabled, then the 10 minute time will be reset to prevent having the weather change a few minutes after you changed it. +. Added blackout feature. Type /blackout to toggle it on or off. (Blackout removes all light sources from the game). +. Added notifications for the player that changes the time/weather/blackout mode/freeze and unfreeze weather and time.
~ Fixed chat message bug (displaying incorrect new time after using /time <h> <m>) + Added parameters to the command suggestions to improve user experience
+ Added /freezetime command to toggle frozen time. + Fixed "access denied" bug. ~ Made all chat messages somewhat use the same format/style. + Added chat suggestions!
+ Added console support for the commands. + Improved invalid syntax errors to show the correct usage. + Fixed an issue that would crash your game if you set the time to be more than 23 hours or more than 59 minutes.