[Release] vSyncR, a better and updated version of vSync (Weather/Time)

how i can change to the 24 Hours format and realtime setting ?

1 Like

Is it possible to trigger an event or so to check what time it is on the server?

Weather is not changing at all. Only time and the time of the day is working.
Any help?

1 Like

The fix is literally 1 line that could’ve been very easilly implemented but i can’t post it here because of the licence.

Edit: Nvm that was a different script i was looking at.

Replace the block starting at line 46 in the client LUA.

Citizen.CreateThread(function()
    local hour = 0
    local minute = 0
    local second = 0 -- Add this
    while true do
        Citizen.Wait(0)
        local newBaseTime = baseTime
        if GetGameTimer() - 500  > timer then
            newBaseTime = newBaseTime + 0.25
            timer = GetGameTimer()
        end
        if freezeTime then
            timeOffset = timeOffset + baseTime - newBaseTime
        end
        baseTime = newBaseTime
        hour = math.floor(((baseTime+timeOffset)/60)%24)
        minute = math.floor((baseTime+timeOffset)%60)
        second = (baseTime+timeOffset-math.floor(baseTime+timeOffset)) * 60.0 -- Add this

        NetworkOverrideClockTime(hour, minute, second) -- Replace 0 with "seocnd".
    end
end)


This should make the time sync a bit more precise making the shadows move a bit less "aggressively". Feel free to pull/change that on the repo aswell OP.

Any fix for the /weather command not working?