Exports

Weather Sync's server and client exports, and the old weather scripts it stands in for.

Server

Lua
exports.gg_weathersync:setWeather('RAIN', instant)    -- true when it was a weather
exports.gg_weathersync:setTime(21, 30, instant)
exports.gg_weathersync:freezeTime(true)
exports.gg_weathersync:freezeWeather(true)
exports.gg_weathersync:setBlackout(true)
exports.gg_weathersync:setLook('miami')               -- nil or 'none' takes it off
exports.gg_weathersync:getState()                     -- { time, minute, timeFrozen, weather, weatherFrozen, blackout, look, quake }
exports.gg_weathersync:startQuake(6.5, 'sandy')       -- true and the quake; size and place optional
exports.gg_weathersync:stopQuake()
exports.gg_weathersync:getQuake()                     -- { magnitude, place, label, where, natural } or nil
exports.gg_weathersync:meteorStrike(src, big, x, y)   -- a meteor in 9 s near player src (nil: anyone) or at x, y

Client

Pause the shared time and weather for one player (an interior, a character screen, a cutscene), set your own, then give it back. Holds stack, so two scripts can hold at once.

Lua
exports.gg_weathersync:hold('my_interior')
exports.gg_weathersync:release('my_interior')
exports.gg_weathersync:isSynced()
exports.gg_weathersync:getState()

Scripts written for other weather scripts

Weather Sync provides qb-weathersync, qbx_weathersync and cd_easytime, so a dependency on any of them is met, and scripts written for them keep working.

  • qb-weathersync and qbx_weathersync (qbx_core, qbx_adminmenu, apartments): every export under both names, and the server events setWeather, setTime, toggleBlackout, toggleFreezeTime and toggleDynamicWeather, which check the panel's access.
  • cd_easytime: GetWeather, GetAllData, SetTime, SetWeather and GetRealData on the server, and GetWeather, GetAllData and GetPauseSyncState on the client.
  • Renewed-Weathersync: its GlobalState keys weather, blackOut, freezeTime, currentTime, timeScale and isNight stay up to date, and a script that sets one changes the shared time or weather.

On the client, qb-weathersync:client:DisableSync and EnableSync, vSync:toggle, cd_easytime:PauseSync and Renewed's LocalPlayer.state.syncWeather = false still pause it for one player.

Scripts that ask for the weather get the game weather underneath an event: Clear during an Aurora.

Support

Questions before you buy?

Ask the team in our Discord before you pay a thing. Setup help, update notes, giveaways and discount codes, all in one place.

831 online now2,241 members