This section controls the visual "Scene" or background the player sees when they are in the job lobby. You can choose to use a custom scene, sync it with the live server weather, or force a specific "perfect weather" look when player is waiting in lobby.
Scene Toggles
CustomSceneInLobby: Decides if the custom scene in lobby is create, so vehicles, custom time etc..
true: Uses the custom scene.
false: Does not use the custom scene. Player time is synced with server and there are no vehicles in the background
SyncServerTimeInLobby: Controls the weather/time inside the lobby.
true: Matches the live server weather (e.g., if it's raining in-game, it rains in the menu).
false: Uses the custom weather defined in Config.LobbyTime.
Config.TimeScript='auto' -- choose from auto/vSync/cd_easytime/qb-weathersync/Renewed-Weathersync/custom
⚠️Important
If you are using vSync you have to modify the client side of the script, accodring to our tutorial.
Find this event or part of the code (by default this is the 10th line):
Replace it with this part of the code or just add this one line in that event before CurrentWeather and blackout is being updated.
The second part of edits, start with finding this line of the code (by default this is the 16th line)
And replace it with this code:
⚠️Important
If you are using cd_easytime, and you want to set weather different thanEXTRASUNNY you have to go toclient -> client.lua -> and in line 24comment the weather change or set weather there to your preference
Background Vehicle (Config.LobbyVehicle)
Defines the decorative truck shown in the background of the lobby scene.
model: The model of the vehicle (e.g., phantom3, hauler).
lightsOn: If true, the truck's headlights will be turned on for cinematic effect.
Default
Custom Time(Config.LobbyTime)
Only used if SyncServerTimeInLobby = false.
Purpose: Sets a static, "perfect" look for players that are in the lobby (e.g., Midnight, Sunny). This ensures the players always have this cinematic effect, even if the actual server is having a thunderstorm.
RegisterNetEvent('vSync:updateWeather', function(NewWeather, newblackout)
if LocalPlayer.state.InTruckerLobby then return end -- this is the one line
CurrentWeather = NewWeather
blackout = newblackout
end)
Citizen.CreateThread(function()
while true do
if lastWeather ~= CurrentWeather then
lastWeather = CurrentWeather
SetWeatherTypeOverTime(CurrentWeather, 15.0)
Citizen.Wait(15000)
end
Citizen.Wait(100)
SetBlackout(blackout)
ClearOverrideWeather()
ClearWeatherTypePersist()
SetWeatherTypePersist(lastWeather)
SetWeatherTypeNow(lastWeather)
SetWeatherTypeNowPersist(lastWeather)
if lastWeather == 'XMAS' then
SetForceVehicleTrails(true)
SetForcePedFootstepsTracks(true)
else
SetForceVehicleTrails(false)
SetForcePedFootstepsTracks(false)
end
end
end)
Citizen.CreateThread(function()
while true do
if not LocalPlayer.state.InTruckerLobby then
if lastWeather ~= CurrentWeather then
lastWeather = CurrentWeather
SetWeatherTypeOverTime(CurrentWeather, 15.0)
Citizen.Wait(15000)
end
Citizen.Wait(100)
SetBlackout(blackout)
ClearOverrideWeather()
ClearWeatherTypePersist()
SetWeatherTypePersist(lastWeather)
SetWeatherTypeNow(lastWeather)
SetWeatherTypeNowPersist(lastWeather)
if lastWeather == 'XMAS' then
SetForceVehicleTrails(true)
SetForcePedFootstepsTracks(true)
else
SetForceVehicleTrails(false)
SetForcePedFootstepsTracks(false)
end
end
end
end)
Config.LobbyVehicle = {
model = 'phantom3',
lightsOn = true,
}