Weather Sync
LB Racing can freeze the weather and time while a player uses the track creator. This provides consistent visibility and is configured with Config.Creator.Weather.
By default, client/custom/functions/functions.lua sends events used by common weather resources when FreezeWeather and UnfreezeWeather run:
ToggleWeatherSyncqb-weathersynccd_easytime
If you use another weather resource, add its pause and resume calls to these functions:
function FreezeWeather()
if not Config.Creator?.Weather?.Freeze then
return
end
TriggerEvent("your-weather:pauseSync", true)
freezeWeatherInterval:toggle(true)
end
function UnfreezeWeather()
if not Config.Creator?.Weather?.Freeze then
return
end
freezeWeatherInterval:toggle(false)
TriggerEvent("your-weather:pauseSync", false)
endReplace the example events with the API provided by your weather resource. The important part is that the weather resource stops applying weather and time while LB Racing’s interval is active, then resumes afterward.
If both resources keep applying weather or time, the screen will flicker in the track creator.
To let your weather resource remain in full control instead, disable the creator override:
Config.Creator.Weather.Freeze = false