SimpleSync

From Lemon
Jump to navigation Jump to search

SimpleSync is a resource for FiveM that allows you to synchronize the Weather, Time and Lights (also called Blackout) between clients. There are multiple modes that you can use:

  • Dynamic[1] (Time is increased over time, Weather is changed over time based on the current value)
  • Static (the Weather and Time never changes, unless is done manually)
  • Real[2] (uses the information of real-life cities via Timezones and OpenWeatherMap for Time and Weather respectively)

Unlike other Synchronization scripts, the resource is highly configurable. You can change the Dynamic Weather switches, the scale of the Time and more options. No more scripts fighting for controlling the Time and Weather! Developers have exports available that they can use.

Before using SimpleSync, disable other Time and Weather scripts like vMenu (vmenu_enable_weather_sync and vmenu_enable_time_sync convars to false) and vSync (stop the resource).

Download

Installation

  • Go to the location where your FiveM server data is located
  • Inside of the resources directory, create a folder called simplesync
  • Extract the files inside of the 7zip into the simplesync folder

Setup

You can use the simplesync_modetime and simplesync_modeweather to specify the Sync Modes before starting the Resource. After you start it, you can use the /timemode <mode> and /weathermode <mode> commands to set the Time and Weather modes respectively.

If you want to use Real Weather, you need to get an OpenWeatherMap API Key from https://home.openweathermap.org/api_keys and set it on the simplesync_key convar. Then, you can set the simplesync_city convar to specify a city.

For Real Time Synchronization, you can use the /timezone <tz> command to set a timezone. The command /timezones will show a list of timezones that are available on your current server installation.

Please note that all of the commands are restricted, so you need to add the ace command.<name> to allow users to use the commands.

Convars

See SimpleSync/Convars.

Commands

See SimpleSync/Commands.

Exports

See SimpleSync/Exports.

Notes

  1. The Time is set to 2 IRL seconds = 1 minute in-game by default, just like Story Mode and GTA Online.
  2. Weather needs an OpenWeatherMap API Key.