I made some small changes to the script but it still doesn't work
local weatherHour = {
[0] = 8, -- 0:00 - clear
[1] = 7, -- 1:00 - clear
[2] = 7, -- 2:00 - clear
[3] = 7, -- 3:00 - clear
[4] = 7, -- 4:00 - clear
[5] = 7, -- 5:00 - clear
[6] = 7, -- 6:00 - clear
[7] = 0, -- 7:00 - extra sunny
[8] = 0, -- 8:00 - extra sunny
[9] = 0, -- 9:00 - extra sunny
[10] = 0, -- 10:00 - extra sunny
[11] = 0, -- 11:00 - extra sunny
[12] = 0, -- 12:00 - extra sunny
[13] = 0, -- 13:00 - extra sunny
[14] = 0, -- 14:00 - extra sunny
[15] = 3, -- 15:00 - cloudy
[16] = 3, -- 16:00 - cloudy
[17] = 3, -- 17:00 - cloudy
[18] = 3, -- 18:00 - cloudy
[19] = 3, -- 19:00 - cloudy
[20] = 3, -- 20:00 - cloudy
[21] = 2, -- 21:00 - foggy
[22] = 8, -- 22:00 - foggy
[23] = 2, -- 23:00 - foggy
}
function setWeatherHour()
local hour = getTime().hour
local weather = weatherHour[hour]
setWeather(weather)
end
setTimer(setWeatherHour, 3600000, 0)