diff --git a/client/time.lua b/client/time.lua new file mode 100644 index 0000000..38b2ef4 --- /dev/null +++ b/client/time.lua @@ -0,0 +1,15 @@ +print("^2[time]^7 Client time sync loaded") + +local h, m = 12, 0 + +RegisterNetEvent("time:sync", function(hour, minute) + h, m = hour, minute + NetworkOverrideClockTime(h, m, 0) +end) + +CreateThread(function() + while true do + NetworkOverrideClockTime(h, m, 0) + Wait(1000) + end +end) diff --git a/client/weather.lua b/client/weather.lua new file mode 100644 index 0000000..2b22283 --- /dev/null +++ b/client/weather.lua @@ -0,0 +1,17 @@ +print("^2[weather]^7 Client weather sync loaded") + +local weather = "CLEAR" + +RegisterNetEvent("weather:sync", function(w) + weather = w + ClearOverrideWeather() + ClearWeatherTypePersist() + SetWeatherTypeNowPersist(weather) +end) + +CreateThread(function() + while true do + SetWeatherTypeNowPersist(weather) + Wait(10000) + end +end)