Configuration
All configuration is done in the config/ folder. These files are open (not encrypted), so you can edit them freely. Most settings can also be changed in game from /hzpanel (hz_lib): a value saved in the panel wins over the file.
| File | Purpose |
config/config.lua | Main configuration (general, weather, time, temperature, effects, wind, blackout, disasters, HUD) |
config/seasons.lua | Season cycle, starting season and presets |
config/zones.lua | Climate zones |
config/weather.lua | Weather cycle outside the zones when the seasons are off |
config/time.lua | Clock pace in milliseconds |
config/temperature.lua | Temperature per weather type and hybrid mode weights |
config/weather_types.lua | Weather type properties (temperature, wind, visibility) |
config/locales/*.lua | Translations (12 languages) |
bridge_schema.lua | Settings shown in the /hzpanel Weather module |
Updating from an older version? Your old config.lua keeps working. At start, the console names the removed keys your file still sets to a non-default value (DefaultWeather, WeatherChangeInterval, DefaultSeasonPreset, SyncRealWorldSeasons, HeatPeakHour) and tells you what replaces them.
General
Config.Debug = false
Config.Locale = 'en'
Config.AdminPermission = 'admin'
Config.TemperatureUnit = 'C'
| Parameter | Type | Default | Description |
Debug | boolean | false | Detailed logs in server/client console |
Locale | string | 'en' | Language file from config/locales/ (12 included, see Locales). Restart required |
AdminPermission | string | 'admin' | Permission checked for admin access (panel, commands, disasters) |
TemperatureUnit | string | 'C' | Display unit: 'C' (Celsius) or 'F' (Fahrenheit) |
Who counts as an admin: a player with the ACE named in AdminPermission, or your framework's admin group (ESX admin / superadmin, QBCore / Qbox admin / god). The ACE weather.admin, the ACE command and an hz_lib panel role with the manage right on hz_weather are accepted too. When a player is refused, the server console names the missing permission.
Notifications
Config.Notifications = {
Season = true,
SeasonTitle = nil,
Temperature = false,
}
| Parameter | Type | Default | Description |
Season | boolean | true | Popup when the season changes |
SeasonTitle | string\ | nil | nil | Custom title of that popup (default: season icon + "New season") |
Temperature | boolean | false | Cold / heat notifications. Also needs Effects.playerEffects.notifications = true |
Weather
Config.DynamicWeather = true
Config.TransitionDuration = 25.0
Config.ZoneTransitionDistance = 800.0
Config.FreezeWeather = false
| Parameter | Type | Default | Description |
DynamicWeather | boolean | true | Automatic weather cycle outside the zones when the seasons are off (list in config/weather.lua). With the seasons on, the season presets drive the weather |
TransitionDuration | number | 25.0 | Seconds of fade per weather step when a zone's weather changes |
ZoneTransitionDistance | number | 800.0 | Width in meters of the weather blend across a zone border: half before the line, half after |
FreezeWeather | boolean | false | Freeze the weather at startup (no automatic changes) |
Available weather types: EXTRASUNNY, CLEAR, CLOUDS, OVERCAST, RAIN, THUNDER, CLEARING, FOGGY, SMOG, SNOW, SNOWLIGHT, BLIZZARD, XMAS, NEUTRAL, plus HALLOWEEN from the panel and the forecast editor.
Weather Influence (Zone Blending)
Config.WeatherInfluence = {
enabled = true,
maxDiff = 2,
}
| Parameter | Type | Default | Description |
enabled | boolean | true | Neighboring zones blend their weather naturally |
maxDiff | number | 2 | Max steps on the weather scale between neighbors (1 = strict, 3 = loose) |
Weather scale: EXTRASUNNY(1) > CLEAR(2) > CLOUDS(3) > OVERCAST(4) > RAIN(5) > THUNDER(6). With maxDiff = 2, if one zone has THUNDER, the neighbor can be at most OVERCAST.
Weather Outside Zones (config/weather.lua)
This list is only used outside the climate zones when the seasons are off (Config.SeasonsEnabled = false or cycleMode = 'disabled'). With the seasons on, the season presets drive the weather and this list is not used, decemberSnow included. useScheduledWeather applies in every case.
| Parameter | Default | Description |
useScheduledWeather | true | Rain then thunder before a txAdmin scheduled restart, in every zone except the ones an admin locked |
serverDuration | 14 | Server uptime in hours before a restart (e.g. restart every 8 h: set 9) |
weatherCycletimer | 90 | Minutes between two weather changes |
timeBetweenRain | 180 | Minimum minutes between two rain episodes |
rainAfterRestart | 60 | Minutes after a restart before rain can appear |
decemberSnow | true | Permanent snow in December |
useStaticWeather | true | Pick single weathers from staticWeather (chance per type) |
useWeatherSequences | true | Pick ready-made sequences from weatherSequences (sunny, cloudy, snowfall, snowstorm, shower, thunderstorms, big storm), each with its chance, durations in minutes and wind |
Time
Config.DayLengthMinutes = 0
Config.NightLengthMinutes = 0
Config.TimeScale = 1.0
Config.FreezeTime = false
Config.StartTime = { hour = 8, minute = 0 }
Config.NightSpeedMultiplier = 1.0
Config.UseRealTime = false
Config.NightTime = { beginning = 22, ending = 6 }
| Parameter | Type | Default | Description |
DayLengthMinutes | number | 0 | How many real minutes the day lasts (from NightTime.ending to NightTime.beginning), e.g. 240 = 4 real hours. 0 = use TimeScale |
NightLengthMinutes | number | 0 | How many real minutes the night lasts, e.g. 120. 0 = same pace as the day |
TimeScale | number | 1.0 | Multiplier on the pace of config/time.lua: 1.0 = that pace (96 min day by default), 2.0 = 2x faster. Ignored when DayLengthMinutes is set |
FreezeTime | boolean | false | Freeze time at startup |
StartTime | table | {hour=8, minute=0} | Clock on the very first start only. Later starts resume the saved time |
NightSpeedMultiplier | number | 1.0 | Night length ratio: 1.0 = same pace as the day, 2.0 = nights 2x longer, 0.5 = nights half as long. Ignored when a length is set |
UseRealTime | boolean | false | Follow the server's real clock (every speed setting is then ignored) |
NightTime | table | {beginning=22, ending=6} | Hours defining the night period |
Minimum pace: 1 game minute per real second. A 16 h day (06:00 to 22:00) needs DayLengthMinutes = 16 or more, an 8 h night NightLengthMinutes = 8 or more. Below that, the console warns and caps the pace.
Clock Pace (config/time.lua)
| Parameter | Default | Description |
timeScale | 4000 | Milliseconds per in-game minute (4000 = 96 min full day). Config.TimeScale multiplies it |
useNightScale | false | Use timeScaleNight during the night hours |
timeScaleNight | 8000 | Milliseconds per in-game minute at night |
Temperature
Config.TemperatureEnabled = true
Config.TemperatureMode = 'hybrid'
Config.TemperatureUpdateInterval = 5
Config.TemperatureRandomVariation = 2.0
| Parameter | Type | Default | Description |
TemperatureEnabled | boolean | true | Enable temperature system. Off = no temperature shown anywhere (HUD, phone app, effects) |
TemperatureMode | string | 'hybrid' | Calculation mode (see below) |
TemperatureUpdateInterval | number | 5 | Seconds between recalculations |
TemperatureRandomVariation | number | 2.0 | Random variation in degrees (±) |
Temperature modes:
'zone': based only on the zone's min/max range
'weather': based only on the current weather type
'hybrid': combines both (recommended)
Hour Modifiers (Day/Night Curve)
Config.TemperatureHourModifiers = {
[0] = -8, -- Midnight
[4] = -10, -- 4 AM (coldest)
[8] = -3, -- 8 AM (sunrise)
[12] = 3, -- Noon
[14] = 5, -- 2 PM (peak)
[20] = 1 -- 8 PM (evening)
}
Values are added to the base temperature. Hours in between are interpolated automatically. This curve is used when the seasons are off and for ignoreSeason zones; with the seasons on, each season's temperatureModifiers set the day/night curve.
Weather Modifiers (config/temperature.lua)
| Parameter | Default | Description |
weatherModifiers | EXTRASUNNY = 8 to BLIZZARD = -25 | °C added per weather type (e.g. RAIN = -6, SNOW = -15, SMOG = 3) |
hybridWeights | { zone = 0.6, weather = 0.4 } | Share of the zone range and of the weather type in 'hybrid' mode |
Seasons
Config.SeasonsEnabled = true
| Parameter | Type | Default | Description |
SeasonsEnabled | boolean | true | Enable season system (can be toggled live from /hzpanel) |
The cycle mode, the season length, the starting season and the presets are set in config/seasons.lua: see Season Presets below.
Gameplay Effects
All effects are configured under Config.Effects:
Vehicle Traction
vehicleTraction = {
enabled = false,
rainModifier = 0.7,
snowModifier = 0.5,
blizzardModifier = 0.3,
}
| Parameter | Type | Default | Description |
enabled | boolean | false | Enable traction modification |
rainModifier | number | 0.7 | 70% grip in rain |
snowModifier | number | 0.5 | 50% grip in snow |
blizzardModifier | number | 0.3 | 30% grip in blizzard |
Reduced Visibility
reducedVisibility = {
enabled = true,
}
| Parameter | Type | Default | Description |
enabled | boolean | true | Fog in bad weather (FOGGY, SMOG, RAIN, THUNDER, SNOW, BLIZZARD). It follows the sky and fades in, it does not appear at once |
Player Effects (Cold / Heat)
playerEffects = {
enabled = true,
notifications = true,
freezing = true,
heatStroke = true,
coldThreshold = 10,
heatThreshold = 30,
screenFx = true,
}
| Parameter | Type | Default | Description |
enabled | boolean | true | Enable player weather effects (not inside interiors) |
notifications | boolean | true | Notification when entering a cold / heat state. Off by default since 1.4.2 because Config.Notifications.Temperature is false: set both to true to get them. One notification per 2 minutes per state at most |
freezing | boolean | true | Shivering animation, screen frost |
heatStroke | boolean | true | Sweat animation, screen distortion |
coldThreshold | number | 10 | Below this temperature (°C) = cold effects. 2 °C hysteresis: once cold, the temperature must rise to coldThreshold + 2 before the effects switch off |
heatThreshold | number | 30 | Above this temperature (°C) = heat effects. 2 °C hysteresis: once hot, the temperature must drop to heatThreshold - 2 before the effects switch off |
screenFx | boolean | true | Enable screen post-processing effects |
Speed Reduction
speedReduction = {
enabled = false,
blizzardModifier = 0.85,
}
When enabled, players sprint at 85% speed during blizzard conditions.
NPC Population After a Disaster
Config.RestorePopulationBudget = 3
NPC population budget (0-3) given back after a tsunami or a tornado. Set it to your server's value if another script lowers it.
Wind
Config.WindEnabled = true
Config.WindUpdateInterval = 10
Config.WindGustsEnabled = true
Config.WindGustsProbability = 0.2
Config.WindGustsMultiplier = 1.5
| Parameter | Type | Default | Description |
WindEnabled | boolean | true | Enable wind system. The speed follows the weather of the player's zone |
WindUpdateInterval | number | 10 | Seconds between wind updates. The direction drifts, it does not jump |
WindGustsEnabled | boolean | true | Enable random wind gusts |
WindGustsProbability | number | 0.2 | 20% chance of gust per update |
WindGustsMultiplier | number | 1.5 | Gust strength multiplier |
Blackout
Config.BlackoutEnabled = true
Config.BlackoutAffectsVehicles = false
Config.BlackoutExceptions = {}
| Parameter | Type | Default | Description |
BlackoutEnabled | boolean | true | Enable blackout system |
BlackoutAffectsVehicles | boolean | false | Vehicle headlights also turn off |
BlackoutExceptions | string[] | {} | Climate zones that keep their lights during a blackout, by zone name, e.g. { 'sandy_shores', 'paleto' } |
The blackout is started and stopped from the panel map, the SetBlackout export or the qb-weathersync compatibility layer. Exceptions are whole climate zones, not single buildings. An unknown zone name is reported in the console at start.
Tornado
Config.Tornado = { ... }
General
| Parameter | Type | Default | Description |
Enabled | boolean | true | Enable tornado system |
Command | string | 'tornado' | Admin command name (/tornado start\|stop\|instant\|pause\|status) |
WarningDuration | number | 30 | Alert before touchdown (seconds) |
ActiveDuration | number | 180 | Active on ground (seconds) |
DissipatingDuration | number | 30 | Dissipation fadeout (seconds) |
IntensityRampUp | number | 30 | Seconds to reach 100% intensity |
TickInterval | number | 50 | Server update interval (ms) |
WeatherRadius | number | 500.0 | Radius (meters) around the tornado where the weather switches to THUNDER |
DisableTraffic | boolean | true | Disable NPC traffic during the event |
Movement
| Parameter | Type | Default | Description |
MovementEnabled | boolean | true | Tornado moves across the map |
MoveSpeed | number | 0.3 | Movement speed (units/tick) |
DestinationMinDist | number | 80.0 | Min distance for next waypoint |
DestinationMaxDist | number | 250.0 | Max distance for next waypoint |
Visual (Particle System)
| Parameter | Type | Default | Description |
ParticleLayers | number | 8 | Vertical particle layers |
ParticlesPerLayer | number | 2 | Particles per layer |
BaseRadius | number | 9.4 | Base funnel radius |
LayerSeparation | number | 22.0 | Vertical spacing between layers |
RotationSpeed | number | 2.0 | Rotation speed (rad/s) |
GirthModifier | number | 5.0 | Top-of-funnel flare |
ParticleBaseScale | number | 3.0 | Base particle size |
DebrisLayers | number | 2 | Dark debris layers at base |
DebrisScale | number | 4.7 | Debris particle scale |
CloudTopLayers | number | 2 | Wide cloud layers at top |
CloudTopScale | number | 10.0 | Cloud top scale |
CloudTopRadiusMult | number | 2.0 | Cloud top radius multiplier |
CloudTopSpeedMult | number | 0.16 | Cloud top rotation speed |
Physics (3-Force Vortex Model)
| Parameter | Type | Default | Description |
HorizontalPullForce | number | 1.2 | Attraction toward center |
VerticalForce | number | 1.0 | Upward lift force |
TangentialForce | number | 0.8 | Spinning/rotational force |
ForceScale | number | 2.0 | Global force multiplier |
MaxEntitySpeed | number | 35.0 | Speed cap for thrown entities |
EntityCollectRadius | number | 45.0 | Radius to detect entities |
MaxTrackedEntities | number | 20 | Max simultaneous tracked entities |
ThrowVehicles | boolean | true | Throw NPC vehicles |
ThrowPeds | boolean | true | Throw NPCs |
ThrowObjects | boolean | false | Throw world props (disabled: may crash GTA) |
AffectPlayer | boolean | true | Player gets pulled (ragdoll + forces) |
PlayerForceMultiplier | number | 1.2 | Force multiplier on player |
ShockingEvents | boolean | true | NPCs flee and scream |
Debris Props
| Parameter | Type | Default | Description |
SpawnDebris | boolean | true | Spawn flying debris objects |
MaxDebrisProps | number | 5 | Max simultaneous debris |
DebrisSpawnMin | number | 3000 | Min spawn interval (ms) |
DebrisSpawnMax | number | 6000 | Max spawn interval (ms) |
DebrisLifetime | number | 6500 | Debris lifetime (ms) |
DebrisModels | string[] | {...} | Prop model names to use |
Visual Effects (Tornado.Effects)
| Parameter | Type | Default | Description |
CameraShake | boolean | true | Camera shake near the tornado |
ShakeIntensity | number | 0.3 | Shake intensity (0.0-1.0) |
ShakeRadius | number | 200.0 | Shake radius (meters) |
ScreenOverlay | boolean | true | Screen overlay |
OverlayAlpha | number | 25 | Overlay opacity (0-255) |
Timecycle | boolean | true | Dark atmosphere timecycle |
TimecycleModifier | string | 'MP_Killstreak' | Timecycle modifier name |
ForceWeather | boolean | true | Force THUNDER within WeatherRadius |
ForceWind | boolean | true | Increase wind speed |
WindSpeed | number | 15.0 | Wind speed during the tornado |
Notification Messages
| Parameter | Default | Trigger |
WarningMessage | '~r~TORNADO ALERT~s~ — Seek shelter immediately!' | Warning start |
TouchdownMessage | '~r~TORNADO~s~ — Touchdown confirmed' | Touchdown |
DissipatingMessage | '~y~TORNADO~s~ — The tornado is dissipating' | Dissipating start |
EndMessage | '~g~TORNADO OVER~s~ — Returning to normal' | Event end |
Tsunami
Config.Tsunami = { ... }
General
| Parameter | Type | Default | Description |
Enabled | boolean | true | Enable tsunami system |
Command | string | 'tsunami' | Admin command name (/tsunami start\|stop\|instant\|pause\|status) |
WarningDuration | number | 120 | Seconds of siren before the water rises (time to evacuate) |
MaxWaterHeight | number | 200.0 | Maximum water height (meters) |
RiseSpeed | number | 0.08 | Meters per tick while rising |
RecedeSpeed | number | 0.04 | Meters per tick while receding |
MaxRecedeSeconds | number | 60 | The recede never takes longer: faster steps when RecedeSpeed is too slow |
TickInterval | number | 100 | Milliseconds between ticks |
PeakDuration | number | 300 | Seconds at max height (5 min) |
DisableTraffic | boolean | true | Disable NPC traffic during tsunami |
PedsDieInWater | boolean | true | NPCs die when submerged |
PedsCanSwim | boolean | true | NPCs can swim underwater |
Aftermath Mode
| Parameter | Type | Default | Description |
Mode | string | 'spectacle' | 'spectacle' = quick reset after the recede. 'survival' = the water stays for SurvivalDurationMinutes, then recedes, so the RP can play out |
SurvivalDurationMinutes | number | 30 | How long the water stays in 'survival' mode |
Visual Effects (Tsunami.Effects)
| Parameter | Type | Default | Description |
ForceWeather | boolean | false | false = keep the players' current sky. true = force WeatherType |
WeatherType | string | 'OVERCAST' | Forced weather when ForceWeather = true ('OVERCAST', 'CLOUDS', 'THUNDER'...) |
ForceWind | boolean | true | Strong wind for the whole event |
WindSpeed | number | 12.0 | Wind speed during tsunami |
CameraShake | boolean | false | Camera shake during event |
ShakeIntensity | number | 0.3 | Shake intensity (0.0-1.0) |
ScreenOverlay | boolean | false | Blue/cyan screen overlay |
OverlayAlpha | number | 40 | Overlay opacity (0-255) |
Timecycle | boolean | false | Dark atmosphere timecycle |
TimecycleModifier | string | 'MP_Killstreak' | Timecycle modifier name |
Sirens and Voice (Tsunami.Sounds)
| Parameter | Type | Default | Description |
Enabled | boolean | true | Enable tsunami sounds |
SirenEnabled | boolean | true | 3D sirens at the SirenPoints (needs xsound) |
SirenVolume | number | 0.25 | Max siren volume (0.0-1.0) |
SirenDistance | number | 1000.0 | Audible radius of each siren (meters) |
SirenDuckFactor | number | 0.2 | Siren volume while the voice talks (0.0-1.0) |
VoiceEnabled | boolean | true | Civil-defense voice alerts, played from the speaker nearest the player |
VoiceVolume | number | 1.0 | Voice gain (0.0-2.0) |
VoiceRefDistance | number | 150 | Below this distance the voice is at max volume |
VoiceMaxDistance | number | 3000 | At this distance the voice fades to silence |
SirenPoints | vector3[] | 12 points | Speaker positions (Port of Los Santos, Del Perro Pier, Vespucci Beach, Paleto Bay, Mt Chiliad...). Add your own for a custom coastline |
The sirens need the xsound resource: without it, the tsunami still runs but the sirens stay silent. The voice alerts do not use xsound. They ship in English and French, chosen from Config.Locale.
Notification Messages
| Parameter | Default | Trigger |
WarningMessage | '~r~TSUNAMI ALERT~s~ — Evacuate to higher ground!' | Warning start |
PeakMessage | '~b~TSUNAMI~s~ — Maximum level reached' | Peak reached |
RecedeMessage | '~g~TSUNAMI~s~ — Waters are receding' | Receding start |
EndMessage | '~g~TSUNAMI OVER~s~ — Returning to normal' | Event end |
Database
Config.SaveConfigToDB = true
| Parameter | Type | Default | Description |
SaveConfigToDB | boolean | true | Save the zone temperature ranges changed from the panel map |
The tables are created automatically on first start (see Installation).
Compatibility
Config.EnableQBCompat = true
| Parameter | Type | Default | Description |
EnableQBCompat | boolean | true | Expose qb-weathersync exports and events. Restart required |
Set it to false if no script on your server depends on qb-weathersync. The cd_easytime layer (cd_easytime:PauseSync) and the vSync layer (vSync:toggle, vSync:updateWeather, vSync:requestSync) are always on.
Cayo Perico
Config.CayoPerico = true
| Parameter | Type | Default | Description |
CayoPerico | boolean | true | Enable the Cayo Perico zone and its map image. Restart required |
HUD
Config.HUD = {
Enabled = true,
UpdateInterval = 5000,
}
| Parameter | Type | Default | Description |
Enabled | boolean | true | Show in-game weather HUD |
UpdateInterval | number | 5000 | HUD refresh rate (milliseconds) |
Config.MaxHistoryDays = 30
Config.CleanHistoryOnStart = true
| Parameter | Type | Default | Description |
MaxHistoryDays | number | 30 | Days of history to keep in database |
CleanHistoryOnStart | boolean | true | Clean old history on resource start |
Climate Zones (config/zones.lua)
The 10 shipped zones: paleto, mont_josiah, sandy_shores, banham_canyon, vinewood_hills, vinewood, tataviam_mountains, palomino_highlands, los_santos and cayo_perico (circle, ignoreSeason = true). Zone names are the ones exports, commands and BlackoutExceptions use.
| Field | Description |
name | Unique id |
label | Display name per language |
zoneType | 'circle' (center, radius, useZ) or 'poly' (points, minZ, maxZ) |
priority | 1-10, the higher wins where zones overlap |
weather | Base weather. With the seasons on, the season sets the weather of every zone except ignoreSeason zones |
ignoreSeason | true = the zone keeps its own weather (no season, no neighbor influence), only an admin changes it |
temperature | { min, max } in °C |
isActive | true / false |
neighbors | Neighbor zones for the weather gradient |
A zone saved from the panel zone editor lives in the hz_weather_zones table, and that row wins over config/zones.lua for its shape, base weather and temperature (the server console lists these zones at start). To give a zone back to the file, reset it in the editor or delete its row.
Weather set by an admin (panel or command) is locked and survives restarts until it is unlocked: lock badge on the panel map, or /weatherunlock <zone|all>.
Season Presets (config/seasons.lua)
This file defines the cycle, the 4 season presets and the transitions.
Cycle Mode
cycleMode = 'auto' -- 'disabled', 'auto', 'realtime'
disabled: no season cycle (manual weather)
auto: the seasons rotate automatically, in seasonOrder, starting from startingSeason
realtime: the seasons follow the server's real calendar (realtimeMapping: December to February = winter, March to May = spring, June to August = summer, September to November = autumn)
The mode picked in the panel's Seasons tab is kept after a restart.
Season Length and Starting Season
cycleDuration = 120 -- Length of ONE season in real minutes ('auto' mode)
startingSeason = 'spring' -- 'spring', 'summer', 'autumn', 'winter'
120 = each season lasts 2 real hours (8 h for the 4). The season changes when the weather entry running at that time ends.
Preset Structure
Each season defines a weather sequence and temperature modifiers:
spring = {
label = { fr = "Printemps", en = "Spring", es = "Primavera", de = "Frühling" },
icon = "...",
-- Played in order. Durations are REAL minutes
weatherSequence = {
{ weather = 'CLEAR', duration = 80 },
{ weather = 'CLOUDS', duration = 60 },
{ weather = 'OVERCAST', duration = 45 },
{ weather = 'CLEARING', duration = 35 },
{ weather = 'RAIN', duration = 50 },
{ weather = 'CLEARING', duration = 40 },
},
temperatureModifiers = {
base = 16.0,
morning = -3,
afternoon = 5,
night = -6,
},
}
Season Transitions
transitions = {
enabled = true,
duration = 2, -- Transition duration (real minutes)
transitionWeather = {
['spring_to_summer'] = 'CLEAR',
['summer_to_autumn'] = 'CLOUDS',
['autumn_to_winter'] = 'OVERCAST',
['winter_to_spring'] = 'CLEARING',
},
}
Advanced
| Parameter | Default | Description |
allowSkip | true | Allow admins to skip a season |
saveToDB | true | Save the season progress in the database |
updateInterval | 60 | Update interval (seconds) |
notifyPlayers | true | Notify players when the season changes |
Locales (config/locales/)
12 languages are included: en, fr, es, de, pt, it, tr, ru, pl, zh, ja, ko. Set the active one in config/config.lua (or in /hzpanel), then restart the resource:
Config.Locale = 'en'
An unknown locale falls back to English.
Adding a New Language
- Copy
config/locales/en.lua to config/locales/xx.lua
- Translate all string values
- Set
Config.Locale = 'xx' in config/config.lua (the panel only lists the 12 included languages)
return {
['key_name'] = 'Translated string',
['weather_changed'] = 'Weather changed to %s',
}
After modifying config files, restart the resource with ensure hz_weather or restart the server.