[FREE] Nevera Realtime Weather and Clock Script

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.

GitHub Repository: Nevera FiveM Realtime Weather and Clock

Requirements

  • 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

  1. Data synchronization:
    Prva slika

  2. Data update:
    AĹľuriranje podataka

  3. Resmon value in game:
    Resmon

  4. Clock display in the upper left corner every 10 minutes, with a duration of 15 seconds:
    Prikaz sata

  5. Rain:
    Rain

  6. Sun:
    Sun

Installation

  1. Download the script and place it in the resources folder of your FiveM server.
  2. 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

How to Get Your API Key

  • Visit the OpenWeatherMap website.
  • Sign up for a free account : Click on “Sign Up” and fill in your details to create an account.
  • Once registered, go to the API keys section in your profile.
  • Generate a new API key and use it in the server.cfg file.

Usage

The script automatically fetches real-time weather and clock data and sets it in-game. Weather condition notifications are shown every 10 minutes.

Contributions

If you would like to contribute to the project, feel free to open an issue or submit a pull request.

License

Released under the MIT license.

Latest Version - Improvements and Fixes

GitHub Repository:

  • Visit the releases/tag/v1.0.0 Latest Version

  • Added support for snow conditions

  • Fixed rain that didn’t stop

  • Improved performance and optimizations

8 Likes

I see that in the cfg you put country and city but in your example it is the continent and the country.

How would I put it if I want the climate of the country of Puerto Rico, and its capital?

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

1 Like

OdliÄŤna skripta! Da li se moze da se produzi trajanje prikaza vremena? Nasao sam u clinetu na line 120 ali nisam 100% siguran da je to to.

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):

Here’s what the code would look like:

“Citizen.SetTimeout(30000, function()
prikaziVrijeme = false
end)”

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.

1 Like

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}

To disable console messages, just turn off DEBUG
prefix it with 2 –
in : realtime_server.lua

– print("[DEBUG] API Response: " … response) – Print the entire API response for debugging

that seem to have work better, but the time is 5 hours ahead for some reason.

Here is your time

How can i fix the time being ahead 5 hours?

I’m really sorry, if that’s the case then you’re using the wrong Zone.

:rocket: UPDATE: v1.0.1 Released - TRUE 0.00ms Performance Achieved!

Hey everyone! I’m excited to announce a major performance update for Nevera Realtime Weather!

:zap: What’s New in v1.0.1

Performance Achievements:

  • TRUE 0.00ms constant - No more jumps, no more 0.06ms spikes!
  • 100% render loop eliminated - Zero CPU usage when idle
  • 50% less memory usage (<400KB)

Key Improvements:

:white_check_mark: Completely eliminated render loops - No Wait(0) anywhere in the code
:white_check_mark: Native GTA notifications - Uses built-in notification system instead of custom rendering
:white_check_mark: Event-driven architecture - Only executes when weather updates arrive
:white_check_mark: Smart caching - Reduces unnecessary API calls
:white_check_mark: Added exports - Easy integration with other resources
:white_check_mark: Debug mode - Help troubleshoot any issues
:white_check_mark: Better error handling - Continues working even if API is down

:bar_chart: Real Performance Numbers

State v1.0.0 v1.0.1
Always 0.02-0.10ms 0.00ms
Memory ~1MB <400KB

The script now uses ABSOLUTELY ZERO resources - confirmed constant 0.00ms!

:bell: New Notification System

Instead of rendering text every frame, the script now uses GTA’s native notification system - appears like a text message notification and auto-disappears. Zero performance impact!

:inbox_tray: Download

Get it from GitHub Releases:
Download v1.0.1

:arrows_counterclockwise: Upgrading

Just replace the files - your old config still works! No changes needed in server.cfg.

:bulb: Philosophy Remains the Same

This script is still designed for realistic RP servers - no admin commands, just real-world weather sync. Set it and forget it!


Thanks to everyone who’s been using v1.0.0! Special thanks to those who requested even better performance - we achieved TRUE 0.00ms!

Special focus on Split, Croatia weather (my home city) but works worldwide! :croatia:

Screenshot proof: [0.00ms constant performance] (add your resmon screenshot here)

Let me know if you have any questions!

1 Like