Every export still exists with the same name and signature, but four behave more strictly than they did:
Export | What changed |
|---|---|
| Return |
| Reports the real clock flag. It used to read a second variable that |

Documentation
Every export and event the resource exposes, and what changed in 2.0.
Every export still exists with the same name and signature, but four behave more strictly than they did:
Export | What changed |
|---|---|
| Return |
| Reports the real clock flag. It used to read a second variable that |
| A lock now expires after |
Zones and settings now live in MySQL, so
sql/database.sqlmust be imported before any of this answers with real data.
Get Current Zone Weather
Returns the weather of the zone the player is in.
local weather = exports['qs-zoneweather']:getCurrentZoneWeather()Returns
string -- 'CLEAR', 'RAIN', 'THUNDER', …Returns 'CLEAR' if the player is not in any zone.
Get Current Zone
local zoneId = exports['qs-zoneweather']:getCurrentZone()Returns
string | nilnil if the player is not in a zone.
Get Zone Weather
local weather = exports['qs-zoneweather']:getZoneWeather(zoneId)Parameters
Parameter | Type | Description |
|---|---|---|
| string | The zone identifier |
Returns
string | nil -- nil if the zone doesn't existGet Zone Weather
local weather = exports['qs-zoneweather']:getZoneWeather(zoneId)Parameters
Parameter | Type | Description |
|---|---|---|
| string | The zone identifier |
Returns
string | nilGet All Zone Weather
Returns every zone and its current weather.
local all = exports['qs-zoneweather']:getAllZoneWeather()Returns
{ ['city'] = 'RAIN', ['desert'] = 'CLEAR' }Set Zone Weather
Sets one zone’s weather, and optionally locks it.
local ok = exports['qs-zoneweather']:setZoneWeather(zoneId, weatherType, lock)Parameters
Parameter | Type | Description |
|---|---|---|
| string | Zone identifier |
| string | Weather to set |
| boolean | Optional. Prevents the zone from cycling automatically |
Returns
boolean -- false if the zone or the weather doesn't existA lock expires after
Config.Cycle.lockHours(24 h). Unlock it explicitly if you want it gone sooner.
Set All Zones Weather
local ok = exports['qs-zoneweather']:setAllZonesWeather(weather)Parameters
Parameter | Type | Description |
|---|---|---|
| string | Applied to every zone |
Returns
booleanThis is the only path that accepts TSUNAMI — a flood does not stop at a zone border, so the server refuses it on a single zone.
Get Weather State
Returns the weather of the first available zone — useful for single-zone setups.
local weather = exports['qs-zoneweather']:getWeatherState()Returns
string -- defaults to 'CLEAR' if no zones existGet Time
local hour, minute = exports['qs-zoneweather']:getTime()Returns
number, number -- hour 0-23, minute 0-59
nil, nil -- if the time system is disabledSet Time
local ok = exports['qs-zoneweather']:setTime(hour, minute, freeze)Parameters
Parameter | Type | Description |
|---|---|---|
| number | 0–23 |
| number | 0–59 |
| boolean | Optional. Freezes time at this value |
Returns
boolean -- false if the time system is disabledSet Time Freeze
local frozen = exports['qs-zoneweather']:setTimeFreeze(state)Returns
boolean -- the new freeze stateGet Time Freeze State
local isFrozen = exports['qs-zoneweather']:getTimeFreezeState()Returns
booleanSet Blackout
Disables artificial lights.
local state = exports['qs-zoneweather']:setBlackout(state)Returns
boolean -- the new blackout stateGet Blackout State
local isBlackout = exports['qs-zoneweather']:getBlackoutState()Returns
booleanThe resource answers what cd_easytime and qb-weathersync scripts expect and provides both names, so existing scripts keep working without changes.
Both bridges can be switched off in /weatherconfig if you actually run one of them alongside this.
Client
exports['qs-zoneweather']:GetWeather() --> string
exports['qs-zoneweather']:GetAllData() --> table
exports['qs-zoneweather']:GetPauseSyncState() --> booleanServer
exports['qs-zoneweather']:GetWeather() --> string
exports['qs-zoneweather']:GetAllData() --> table
exports['qs-zoneweather']:GetRealData() --> table (alias)
exports['qs-zoneweather']:SetWeather(weather) --> boolean
exports['qs-zoneweather']:SetTime(hours, mins) --> booleanSetTime defaults to 12 and 0 when its arguments are omitted.
The GetAllData Shape
{
weather = 'CLEAR', -- current weather type
hours = 12, -- game hour (0-23)
mins = 30, -- game minutes (0-59)
freeze = false, -- time freeze state
blackout = false, -- blackout state
dynamic = true, -- always true
instanttime = false, -- instant time change flag
instantweather = false, -- instant weather change flag
pauseSync = false, -- whether sync is paused
}Hooks
Drop a file in server/custom/ to react to the resource without editing it.
Both events fire on every change — whether it came from the cycle, from the /weather panel or from an export — and both need “Broadcast changes” left on in /weatherconfig.
AddEventHandler('qs-zoneweather:weatherChanged', function(zoneId, weather, previous)
print(('%s went from %s to %s'):format(zoneId, previous, weather))
end)
AddEventHandler('qs-zoneweather:timeChanged', function(hour, minute, frozen)
-- e.g. close the shops at night
end)Opening The Settings Panel
To open it for one player from your own admin menu:
TriggerClientEvent('qs-zoneweather:admin:openConfig', src)The client still checks the ACE node before it opens anything — so this is a shortcut, not a way around the permission.
Export | Side | Parameters | Returns |
|---|---|---|---|
| Client | — | string |
| Client | — | string / nil |
| Client | zoneId | string / nil |
| Client | — | string |
| Client | — | table |
| Client | — | boolean |
| Server | zoneId | string / nil |
| Server | — | table |
| Server | zoneId, weather, lock | boolean |
| Server | weather | boolean |
| Server | — | string |
| Server | — | hour, min |
| Server | hour, min, freeze | boolean |
| Server | state | boolean |
| Server | — | boolean |
| Server | state | boolean |
| Server | — | boolean |
| Server | — | string |
| Server | — | table |
| Server | — | table |
| Server | weather | boolean |
| Server | hours, mins | boolean |