Easytime - Time & Weather Management
Easytime is a script for FiveM that utilizes a small but useful UI for FiveM server administrators which allows them to manipulate time and weather with a click of a button!

INSTALLATION GUIDE

1. Unzip the cd_easytime.zip folder and place this folder in your servers resource folder.
2. Before starting the script, please read the config.lua (this is located inside the main cd_easytime folder) and configure the script to suit your server's needs.
3. Add the resource to your server start config: ensure cd_easytime (it must be placed anywhere below your framework resource eg., es_extended, not above). The name of the folder must not be changed or the resource will not function correctly.

Step 1 - How do I use it?

The default command to open the UI is /easytime. It comes pre-configured for esx, qbus, vrp and ace permissions, you just need to add your desired permission groups in the Config.framework_perms in the configs/config.lua.

Step 2 - Persistent weather?

The settings which are saved in the settings.txt file will automatically be applied on server start/script restart.
From client to server
There are 3 ways to save the settings.
    1.
    Staff members with the correct permissions can use the "Save Settings" option on the UI when in-game.
    2.
    When the script is restarted the settings will automatically be saved.
    3.
    By triggering this server event below at least 30 seconds before a server restart.
1
TriggerServerEvent('cd_easytime:SaveSettings')
Copied!

Step 3 - Shell support?

If you do not use shells, ignore this step.
When a player enters/exits a shell you will need to trigger the client event below. So now when you enter a shell the time will change to 11 PM and the weather will change to clear for this player only to ensure there are no visual anomalies.
Trigger this when entering a shell
Trigger this when exiting a shell
1
TriggerEvent('cd_easytime:PauseSync', true)
Copied!
1
TriggerEvent('cd_easytime:PauseSync', false)
Copied!

SCRIPT NOT WORKING?

Common Issues

🔔 Folder Name Make sure the name of the folder is cd_easytime.
Screen Flickering If your screen is flickering while using cd_easytime, this is due to you having multiple time/weather sync scripts running at the same time fighting each other eg., vSync or vMenu.
✔️ Stop the other time/weather script that is causing this.
Permission Checks Error If you are having errors related to the permission checks for the /easytime command.
✔️ Look for the PermissionsCheck function in the server/server.lua. And make sure you have configured the Config.Framework_perms as mentioned in Step 1.

Troubleshooting

1. Check for obvious error prints in the server console and the client F8 console. If you don't see any obvious errors make sure to restart the script while the server is live and check again.
2. If none of the above worked, have a second read through the installation guide above, you may have missed something - you are only human.
If all else fails, contact the Codesign Team in the Codesign Discord.
Config
settings.txt
1
Config = {}
2
3
Config.Framework = 'esx' --[ 'esx / 'qbus' / 'vrp' / 'ace' / 'custom' ] Choose your framework so you can add resctict the command to be used by staff only.
4
Config.Framework_perms = { --You can choose multiple permission group to have access to use the UI. (This will be used by all framework versions by default except the "custom" option).
5
['superadmin'] = true,
6
['admin'] = true,
7
['mod'] = true,
8
['helper'] = false,
9
}
10
11
Config.Command = 'easytime' --Customise the command name to open the UI.
12
Config.Notification_Type = 'chat' --[ 'chat' / 'mythic_old' / 'mythic_new' / 'esx' / 'custom' ] Choose your notification type.
13
Config.Language = 'EN' --[ 'EN' / 'FR' / 'ES' ] Choose your preferred language.
14
Config.NUI_keepinput = false --Do you want to be able to walk around when the UI is open?
15
16
Config.TimeCycleSpeed = 2 --(in seconds) Changing this value will effects the day/night time cycle, decreasing slows it down, incresing speeds it up. Right now its similar to the default gta5 time cycle.
17
Config.DynamicWeather = true --Do you want to allow dynamic weather?
18
Config.DynamicWeather_time = 10 --(in minutes) If dynamic weather is enabled, this value is how long until the weather changes.
19
Config.RainChance = 10 --The percent chance for it to rain out of 100.
20
Config.SnowChance = 1 --The percent chance for it to snow out of 100.
21
Config.ThunderChance = 20 --The percent chance for it to thunder when raining out of 100.
22
23
Config.WeatherGroups = { --These are the weather groups, it will cycle through each group from left to right making sure it cycles through low intensity rain to high intensity for example (48 mins for 1 full day cycle).
24
[1] = {'CLEAR', 'OVERCAST','EXTRASUNNY', 'CLOUDS'},--clear
25
[2] = {'CLEARING', 'RAIN', 'NEUTRAL', 'THUNDER'},--rain
26
[3] = {'SMOG', 'FOGGY'},--foggy
27
[4] = {'SNOWLIGHT', 'SNOW', 'BLIZZARD', 'XMAS'},--snow
28
}
Copied!
1
{"blackout":false,"weather":"CLEAR","mins":0,"dynamic":true,"hours":8,"instantweather":false,"instanttime":false,"freeze":false}
Copied!

CHANGELOG

In every changelog, we have a Files Changed section. Here we inform you if you need to replace the whole folder, or you can replace the specific files which have been updated. We do this because we understand it's a pain to redo the configs for every update.
All Files - This means you should delete your old cd_props folder, download and add in the latest version, re-add your authorization token, reconfigure the configs folder and restart your server.
Specific Files - This means you can simply copy and paste the SPECIFIC new files over the old ones and restart the server.
v1.1.4
v1.1.5
V1.1.6
v1.1.7
v1.2.0
v1.2.1

20/03/2021

Files Changed:
    All files
    Specific Files
Changelog:
Add
    Added a version check to ensure you stay updated with the progress
Edit
    Reworked the FORCED time changes so the changes are a lot smother
    Reworked the natural weather changes so the changes are a lot smoother and barely noticeable
    Reworded the config to be a bit more user friendly
    Added a wait before syncing a players time and weather to ensure stability

21/03/2021

Files Changed:
    All files
    Specific Files
Changelog:
Fix
    Fixed a typo in causing the time cycle to speed up

21/03/2021

Files Changed:
    All files
    Specific Files
Changelog:
Fix
    Fixed a small issue which would cause the weather to change to clear Instantly when entering a shell due to the pervious updates

22/03/2021

Files Changed:
    All files
    Specific Files
Changelog:
Fix
    File clean-up, removed the old client file which was renamed
    Fixed a typo in the client.lua causing a error

15/05/2021

Files Changed:
    All files
    Specific Files
Changelog:
Add
    Added the ability to toggle the instant time and weather change on the in game UI instead of it being a config option, meaning you can choose whether you want to instantly change the time or make the time change slowly so its barely noticeable to players in game
    Added a new config option to allow you to walk around while the UI is open
    Added a fail safe check to make sure the time and weather is synced when a player joins the server
    Added drag and drop compatibility for qbus and ace permissions (read Step 1 for more information)
    The settings now automatically save when the script is restarted
Edit
    Now when you click the "Save Settings" button on the in game UI, your chosen settings will be saved to the settings.txt file and applied in game, then the UI will close. (previously you needed to open the UI, choose your settings, click the "Change" button, reopen the UI and then click the "Save Settings" button)
Fix
    Fixed time not syncing for new players when the FreezeTime option is enabled

29/06/2021

Files Changed:
    All files
    Specific Files
1
fxmanifest.lua
2
server/server.lua
3
server/version_check.lua
4
client/client.lua
Copied!
Changelog:
Edit
    Edited the Config.NUI_keepinput to disable mouse movement and punching/firing weapons while the UI is open
Fix
    Fixed the gradual time changes not working when freeze time was enabled
    Fixed a typo causing the time not to be set correctly when inside a shell
Last modified 1mo ago