I know that this is not ideal but I want to do it anyway.
This works fine when I execute it server side but I can only fire it once which is duo to the loop and the wait I guess, but is there a way to cancel it out and execute a new thread? I tried to use the native CleanAllWeatherModules I think its called, but that didnt work:
RegisterNetEvent("setWeather")
AddEventHandler("setWeather", function(weathertype)
Citizen.CreateThread(function()
while true do
SetWeatherTypePersist(weathertype)
SetWeatherTypeNowPersist(weathertype)
SetWeatherTypeNow(weathertype)
SetOverrideWeather(weathertype)
Citizen.Wait(1)
end
end)
end)