For the complete documentation index, see llms.txt. This page is also available as Markdown.

Renewed-Weathersync


1. Open the file

Open the following file: Renewed-Weathersync/server/weather.lua

2. Synchronize weather and time

Add the following thread at the end of the file.

CreateThread(function()
    local lastWeather
    local lastHour
    local lastMinute

    Wait(10000)
    
    while true do
        Wait(5000)

        local weather = GlobalState.weather
        local time = GlobalState.currentTime

        if weather.weather ~= lastWeather or time.hour ~= lastHour or time.minute ~= lastMinute then
            lastWeather = weather.weather
            lastHour = time.hour
            lastMinute = time.minute

            TriggerEvent('vms_needs:temperature:update', weather.weather, time.hour, time.minute)
        end
    end
end)

Last updated