From 84526ca6da4766ba236a79000312051939abf394 Mon Sep 17 00:00:00 2001 From: tanthius Date: Thu, 12 Feb 2026 04:23:31 +0000 Subject: [PATCH] Upload files to "client" --- client/time.lua | 15 +++++++++++++++ client/weather.lua | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 client/time.lua create mode 100644 client/weather.lua 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)