local weatherHour = {
[0] = 0,
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 0,
[6] = 1,
[7] = 1,
[8] = 1,
[9] = 1,
[10] = 2,
[11] = 2,
[12] = 3,
[13] = 3,
[14] = 3,
[15] = 4,
[16] = 4,
[17] = 5,
[18] = 5,
[19] = 5,
[20] = 11,
[21] = 11,
[22] = 11,
[23] = 11
}
function setWeatherHour()
local hour = getRealTime().hour
local weather = weatherHour[hour]
setWeatherBlended(weather)
end
setTimer(setWeatherHour, 1000, 0)
Try this
local weatherHour = {
[0] = 0,
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 0,
[6] = 1,
[7] = 1,
[8] = 1,
[9] = 1,
[10] = 2,
[11] = 2,
[12] = 3,
[13] = 3,
[14] = 3,
[15] = 4,
[16] = 4,
[17] = 5,
[18] = 5,
[19] = 5,
[20] = 11,
[21] = 11,
[22] = 11,
[23] = 11
}
function setWeatherHour()
local hour = getRealTime().hour
local weather = weatherHour[hour]
setWeatherBlended(weather)
end
setTimer(setWeatherHour, 1000, 0)
Try this
local weatherHour = {
[0] = 0,
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 0,
[6] = 1,
[7] = 1,
[8] = 1,
[9] = 1,
[10] = 2,
[11] = 2,
[12] = 3,
[13] = 3,
[14] = 3,
[15] = 4,
[16] = 4,
[17] = 5,
[18] = 5,
[19] = 5,
[20] = 11,
[21] = 11,
[22] = 11,
[23] = 11
}
function setWeatherHour()
local hour = getRealTime().hour
local weather = weatherHour[hour]
setWeatherBlended(weather)
end
setTimer(setWeatherHour, 1000, 0)