> For the complete documentation index, see [llms.txt](https://docs.vames-store.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vames-store.com/assets/vms_needs/compatibility/weather/renewed-weathersync.md).

# 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.

```lua
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)
```
