2026-04-14 15:54:53 +02:00

17 lines
445 B
Lua

RegisterNetEvent('mercyv-weather:syncWeather', function(weather)
SetWeatherTypeNowPersist(weather)
SetWeatherTypeOverTime(weather, 15.0)
end)
RegisterNetEvent('mercyv-weather:syncTime', function(h, m)
NetworkOverrideClockTime(h, m, 0)
end)
-- Wetter beim Spawnen vom Server holen
CreateThread(function()
while not NetworkIsSessionStarted() do
Wait(100)
end
TriggerServerEvent('mercyv-weather:requestSync')
end)