Open UI
TriggerServerEvent('cd_easytime:OpenUI')
Open UI
TriggerEvent('cd_easytime:OpenUI', source)
These exports are entirely optional and can be used as needed.
Get All Data
local data = exports['cd_easytime']:GetAllData()
print(data.weather) -- "EXTRASUNNY" [string]
print(data.hours) -- 08 [number]
print(data.mins) -- 00 [number]
print(data.freeze) -- true/false [boolean)
print(data.dynamic) -- true/false [boolean)
print(data.blackout) -- true/false [boolean)
print(data.tsunami) -- true/false [boolean)
print(data.timemethod) -- "realtime"/"gametime" [string]
print(data.weathermethod) -- "realweather"/"gameweather" [string]
Explanation
This export returns a table containing the following information:
data.weather
: The current in-game weather condition (string).
data.hours
: The current hour (number).
data.mins
: The current minutes (number).
data.freeze
: Indicates if time/weather synchronization is frozen (boolean).
data.dynamic
: Indicates if the weather is dynamic (boolean).
data.blackout
: Indicates if a blackout is in effect (boolean).
data.tsunami
: Indicates if a tsunami warning is active (boolean).
data.timemethod
: The method of tracking time, either "realtime" or "gametime" (string).
data.weathermethod
: The method of tracking weather, either "realweather" or "gameweather" (string).
Get Pause Sync State
local pause_sync = exports['cd_easytime']:GetPauseSyncState()
print(pause_sync) -- true/false [boolean]
Get All Data
local data = exports['cd_easytime']:GetAllData()
print(data.weather) -- "EXTRASUNNY" [string]
print(data.hours) -- 08 [number]
print(data.mins) -- 00 [number]
print(data.freeze) -- true/false [boolean)
print(data.dynamic) -- true/false [boolean)
print(data.blackout) -- true/false [boolean)
print(data.tsunami) -- true/false [boolean)
print(data.instantweather) -- true/false [boolean)
print(data.instanttime) -- true/false [boolean)
print(data.timemethod) -- "realtime"/"gametime" [string]
print(data.weathermethod) -- "realweather"/"gameweather" [string]
Explanation
This export returns a table containing the following information:
data.weather
: The current in-game weather condition (string).
data.hours
: The current hour (number).
data.mins
: The current minutes (number).
data.freeze
: Indicates if time/weather synchronization is frozen (boolean).
data.dynamic
: Indicates if the weather is dynamic (boolean).
data.blackout
: Indicates if a blackout is in effect (boolean).
data.tsunami
: Indicates if a tsunami warning is active (boolean).
data.instantweather
: Indicates if the weather changes are instant (boolean).
data.instanttime
: Indicates if the time changes are instant (boolean).
data.timemethod
: The method of tracking time, either "realtime" or "gametime" (string).
data.weathermethod
: The method of tracking weather, either "realweather" or "gameweather" (string).
Get Real Time & Weather Data
local data = exports['cd_easytime']:GetRealData()
print(data.hours) -- 08 [number]
print(data.mins) -- 08 [number]
print(data.gta_weather) -- "EXTRASUNNY" [string]
print(data.real_weather) -- "Clear" [string]
print(data.real_weather_description) -- "clear sky" [string]
print(data.country) -- "GB" [string]
print(data.city) -- "London" [string]
Explanation
This export returns a table containing the following information:
data.hours
: The current hour (number).
data.mins
: The current minutes (number).
data.gta_weather
: The in-game weather condition (string).
data.real_weather
: The actual weather condition (string).
data.real_weather_description
: A description of the real weather (string).
data.country
: The country code (string).
data.city
: The city name (string).