LogoLogo
  • Codesign Documentation
  • Information
    • Discord Roles
    • FiveM Asset Escrow System
    • Authentication & Transfers
  • Coding Information
    • Register Key Mapping
    • Code Snippets
    • Self Debugging
  • Paid scripts
    • Arm Wrestling
      • Configs, Locales & SQL
    • Car HUD
      • Configs, Locales & SQL
    • CCTV Cameras
      • Configs, Locales & SQL
    • Darts
      • Configs, Locales & SQL
    • Dispatch
      • Configs, Locales & SQL
      • Resource Integration
    • Door Lock
      • Configs, Locales & SQL
    • Garage
      • Keys/Chat/Events/Exports
      • Optional Features
      • Configs, Locales & SQL
      • Resource Integration
    • Gun Range
      • Configs, Locales & SQL
    • Identity
      • Configs, Locales & SQL
    • Multicharacter
      • Configs, Locales & SQL
    • Player HUD
      • Configs, Locales & SQL
    • Props
      • Configs, Locales & SQL
    • Radar
      • Configs, Locales & SQL
    • Spawn Select
      • Configs, Locales & SQL
    • Terminal Hacker
      • Configs, Locales & SQL
    • Vehicle Control
      • Configs, Locales & SQL
    • VIP Shop
      • Configs, Locales & SQL
  • Free Scripts
    • Easytime
      • Keys/Chat/Events/Exports
      • Optional Features
      • Configs & Locales
    • Drawtext UI
    • Devtools
    • Keymaster - Minigame
    • Staff Support
    • Notifications
Powered by GitBook
LogoLogo

Codesign Software © All rights reserved

On this page
  • Chat Commands
  • Events
  • Exports

Was this helpful?

  1. Free Scripts
  2. Easytime

Keys/Chat/Events/Exports

Chat Commands

  • You can rename or disable these chat commands in the [configs/config.lua].

Command

Description

/easytime

The command for staff to open the UI.



Events

  • These events are entirely optional and can be used as needed.

Open UI

This event opens the UI, enabling players to access its features. A permissions check ensures that only authorized players can trigger it.
TriggerServerEvent('cd_easytime:OpenUI')

Open UI

This event opens the UI, enabling players to access its features. A permissions check ensures that only authorized players can trigger it.
TriggerEvent('cd_easytime:OpenUI', source)



Exports

These exports are entirely optional and can be used as needed.


Get All Data

This export retrieves detailed weather, time and settings data from cd_easytime.
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

This export returns a boolean indicating whether time and weather synchronization is paused, such as when a player has entered a shell.
local pause_sync = exports['cd_easytime']:GetPauseSyncState()

print(pause_sync) -- true/false [boolean]

Get All Data

This export retrieves detailed weather, time and settings data from cd_easytime.
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

The export retrieves real-time and weather data from cd_easytime:
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).

PreviousEasytimeNextOptional Features

Last updated 6 months ago

Was this helpful?