For the complete documentation index, see llms.txt. This page is also available as Markdown.

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)
Parameter
Type
Description

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:

Key
Type
Description

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