Nevera FiveM Realtime Weather and Clock is a script for FiveM servers that synchronizes real-time weather and clock in-game using data from the real world through an API.
Framework: The script is compatible with ESX, QBCore, and Standalone.
FiveM Server: The latest version of the FiveM server.
Features
Real-time synchronization: Fetches real-time data from the API for Country/City.
Automatic weather updates: Weather conditions are updated every 10 minutes.
Notification display: Weather and time notifications are shown for 15 seconds.
Fog disable option: set disable_fog "true" to disable fog (useful for areas like Dalmatia, where fog is rare).
View Images
Data synchronization:
Data update:
Resmon value in game:
Clock display in the upper left corner every 10 minutes, with a duration of 15 seconds:
Rain:
Sun:
Installation
Download the script and place it in the resources folder of your FiveM server.
Configure your server.cfg file:server.cfg to run the script:
set my_sync_key "YOUR_API_KEY" # Your API key
set my_sync_timezone "Europe/Zagreb" # Your country/city
set my_sync_city "Split" # Your city
set disable_fog "true" # Set to "false" if you want to enable fog
set my_sync_timezone “Europe/Zagreb” # Time zone
set my_sync_city “Split” # City
set my_sync_key “Your_API_Key” # Replace with your API key
set disable_fog “true” #Set to “false” if you want to enable fog
If you want to extend the duration, just change the number of milliseconds in Citizen.SetTimeout. For example, for a 30-second display (30000 milliseconds):
Explanation:
The value 60000 represents 60000 milliseconds, which is equivalent to 60 seconds (1 minute). This way the time will remain displayed for 1 minute before being hidden.
Cant seem to get the timezone to work got the city and api, but when i try USA, US, UnitedStates, everything doesnt set timezone. I also try usa/tallahassee usa/miami, doesnt seem to work either.
It works for me
set here: realtime_server.lua
– Set Convars for time zone, city and API key
local timezone = GetConvar(“my_sync_timezone”, “America/New_York”) – Default time zone
local city = GetConvar(“my_sync_city”, “Tallahassee”) – Default city
local apiKey = GetConvar(“my_sync_key”, “Your_ApiKey”) – Replace with your API key
and here: server.cfg
REAL TIME
set my_sync_timezone “America/New_York” # Time zone
set my_sync_city “Tallahassee” # City
set my_sync_key “API_key” # Replace with your API key
set disable_fog “true”
Set Convars for timezone, city and API key
[script:Nevera-realti] [DEBUG] API response: {“coord”:{“lon”:-84.2807,“lat”:30.4383},“weather”:[{“id”:801,“main”:" Clouds",“description”:“partly cloudy”,“icon”:“02n”}],“base”:“stations”,“main”:{“temp”:276.51,“feels_like”:274.8,“temp_min”:275.55,“temp_m ax”:276.67,“pressure”:1027,“humidity”:94,“sea_level”:1027,“grnd_level”:1022},“visibility”:10000,“wind”:{“sp eed”:1.83,“deg”:7,“gust”:5.14},“clouds”:{“all”:13},“dt”:1735819169,“sys”:{“type”:2,“id” :2098118,“country”:“USA”,“rise”:1735821255,“set”:1735858081},“timezone”:-18000,“id”:4174715,“name”:“Tallahassee”,“cod”:200}