Exports & Events
Madonne Seasons exposes client-side exports and NetEvents to allow other resources to integrate with its weather and time data.
📤 GetZonePredictions (client-side)
Returns the weather prediction list for a given GTA V zone code.
local predictions = exports['MS_Madonne_Seasons']:GetZonePredictions(zone)zone
string
A GTA V zone code (e.g. "DOWNT", "SANDY", "PALETO")
Returns: A table of upcoming weather types in order, indexed from 1 to N (where N = number of weather slots for the day).
Example
local playerCoords = GetEntityCoords(PlayerPedId())
local zone = GetNameOfZone(playerCoords.x, playerCoords.y, playerCoords.z)
local predictions = exports['MS_Madonne_Seasons']:GetZonePredictions(zone)
for i, weather in ipairs(predictions) do
print("Slot " .. i .. ": " .. weather)
end☀️ GetSunTimes (client-side)
Returns the current sunrise and sunset hours, which vary dynamically with the season.
Returns: A table with two keys:
sunrise
number
Sunrise hour (e.g. 6.5 = 6h30)
sunset
number
Sunset hour (e.g. 20.3 = 20h18)
Example
📡 NetEvents
MadonneSeasons:SyncWeathers (client)
Fired when weather data is synced to the client (on spawn and on each weather change).
MadonneSeasons:SyncPredictions (client)
Fired alongside SyncWeathers, providing the full prediction table and sun times.
MadonneSeasons:SyncTime (client)
Fired when time data is synced to the client.
Last updated