API

GetWeatherData

Can be used both on client and server side

local data = exports.uniq_weathersync:GetWeatherData()
print(json.encode(data, {indent = true}))

-- print should look like this
{
    weather = 'EXTRASUNNY',
    min = 0,
    hour = 0
}

GetTime

Can be used both on client and server side

local time = exports.uniq_weathersync:GetTime()
print(json.encode(time, {indent = true}))

-- print should look like this

{
    hour = 19,
    min = 34
}

GetWeather

Can be used both on client and server side

local weather = exports.uniq_weathersync:GetWeather()
print(weather)

FreezeTimePlayer

Will freeze both time and weather from syncing for specific player (will reapply last fetched weather & time from API), server side export

exports.uniq_weathersync:FreezeTimePlayer(playerId)

Last updated