For the complete documentation index, see llms.txt. This page is also available as Markdown.

cd_easytime


1. Open the file

Open the following file: cd_easytime/server/server.lua

2. Synchronize weather and time

Add the following thread at the end of the file.

CreateThread(function()
    local lastWeather
    local lastHour
    local lastMinute

    Wait(10000)
    
    while true do
        Wait(5000)

        local weather = self.weather
        local hour = self.hours
        local minute = self.mins

        if weather ~= lastWeather or hour ~= lastHour or minute ~= lastMinute then
            lastWeather = weather
            lastHour = hour
            lastMinute = minute

            TriggerEvent('vms_needs:temperature:update', weather, hour, minute)
        end
    end
end)

Last updated