forked from Simnation/Main
115 lines
No EOL
8.6 KiB
Lua
115 lines
No EOL
8.6 KiB
Lua
--[[
|
|
READ THE DOCS BEFORE USING THIS SCRIPT:
|
|
https://docs.av-scripts.com/guides/weather-script/installation
|
|
https://docs.av-scripts.com/guides/weather-script/installation
|
|
https://docs.av-scripts.com/guides/weather-script/installation
|
|
|
|
if updating from av_weather v1 DON'T copy/paste any config value, everything in this version is different.
|
|
if updating from av_weather v1 DON'T copy/paste any config value, everything in this version is different.
|
|
if updating from av_weather v1 DON'T copy/paste any config value, everything in this version is different.
|
|
]]--
|
|
|
|
Config = {}
|
|
Config.Debug = false -- Needed prints to find possible bugs and get more info about errors
|
|
Config.DebugTime = false -- Print the server time in both F8 and server console (it spams console, only enable if needed)
|
|
Config.DebugFog = false -- used to debug fog
|
|
Config.Command = "weather" -- Command used to open the weather menu
|
|
Config.AdminLevel = "group.admin" -- Admin group needed to access the weather menu
|
|
Config.TempUnit = "C" -- Temperature scale unit "C" or "F" (Celsius/Farenheit)
|
|
Config.NightHours = {20,6} -- Night starts at 8PM and ends 6AM (used for UI icons and smart fog, 24H format)
|
|
Config.RealTime = false -- true/false use the API to retrieve the current City time on server restart
|
|
Config.City = "America/Los_Angeles" -- Continent/Country, list of available zones in timezones.json file
|
|
Config.TimeCycleDuration = 48 -- Duration of the day cycle in real-world minutes (default is 48)
|
|
Config.ResetWeatherOnRestart = true -- If true, generates new weather after server restart; if false, retains previous weather state
|
|
Config.UnfreezeTimeOnRestart = true -- If true, time will resume after server restart; if false, time will keep the state before sv restart
|
|
Config.WeatherTime = 10 --(in minutes) how long until the weather changes.
|
|
Config.UseFog = true -- Fog modifier is a timecycle and can look/act weird for some ppl, if this is your case u can set this to false and use the default GTA fog
|
|
Config.GenerateFog = false -- Allow the server to generate random fog for every zone (server will only use Normal, Low and Medium options)
|
|
Config.BreathEffect = true -- Enables the breath condensation effect when the temperature is 5°C (40°F) or lower and player is outside a building
|
|
Config.RainIntensity = 0.3 -- Higher number = more rain and puddles (original 0.3)
|
|
Config.ThunderIntensity = 0.5 -- Higher number = more rain and puddles (original 0.5)
|
|
Config.SnowLevel = 0.5 -- Snow on ground
|
|
Config.isChristmas = false -- Enable XMAS weather to all zones, no new weather will be generated unless u use the admin menu
|
|
Config.SmartFog = true -- Adjusts fog intensity for better appearance during daytime and reverts to default at night
|
|
Config.MLOFix = false -- Change to true if your MLOs interiors becomes "weird" when there's fog / transition might look a little weird but is only fix for some MLOs :))
|
|
Config.SnowEffect = { -- The following weathers will have snow falling particles
|
|
['XMAS'] = true,
|
|
['SNOW'] = true,
|
|
['SNOWLIGHT'] = true,
|
|
}
|
|
Config.StreetSnow = false -- Enables snow on ground 24/7 no matter the current weather or zone
|
|
|
|
Config.Weathers = {
|
|
['santos'] = { -- zone config
|
|
-- The sum of all chance fields can't be higher than 100
|
|
{type = "CLEAR", chance = 20}, -- % chance of getting this weather (high priority)
|
|
{type = "EXTRASUNNY", chance = 20}, -- % chance of getting this weather (high priority)
|
|
{type = "CLOUDS", chance = 15}, -- % chance of getting this weather (high priority)
|
|
{type = "OVERCAST", chance = 10}, -- % chance of getting this weather (medium priority)
|
|
{type = "RAIN", chance = 10}, -- % chance of getting this weather (medium priority)
|
|
{type = "SMOG", chance = 5}, -- % chance of getting this weather (medium priority)
|
|
{type = "CLEARING", chance = 5}, -- % chance of getting this weather (low priority)
|
|
{type = "FOGGY", chance = 5}, -- % chance of getting this weather (low priority)
|
|
{type = "THUNDER", chance = 3}, -- % chance of getting this weather (low priority)
|
|
{type = "SNOW", chance = 2}, -- % chance of getting this weather (low priority)
|
|
{type = "XMAS", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "SNOWLIGHT", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "BLIZZARD", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "HALLOWEEN", chance = 0}, -- % chance of getting this weather (disabled)
|
|
},
|
|
['paleto'] = {
|
|
-- The sum of all chance fields can't be higher than 100
|
|
{type = "CLOUDS", chance = 25}, -- % chance of getting this weather (high priority)
|
|
{type = "OVERCAST", chance = 20}, -- % chance of getting this weather (high priority)
|
|
{type = "EXTRASUNNY", chance = 15}, -- % chance of getting this weather (high priority)
|
|
{type = "FOGGY", chance = 15}, -- % chance of getting this weather (normal priority)
|
|
{type = "CLEAR", chance = 10}, -- % chance of getting this weather (normal priority)
|
|
{type = "SMOG", chance = 5}, -- % chance of getting this weather (low priority)
|
|
{type = "RAIN", chance = 2}, -- % chance of getting this weather (low priority)
|
|
{type = "CLEARING", chance = 2}, -- % chance of getting this weather (low priority)
|
|
{type = "THUNDER", chance = 1}, -- % chance of getting this weather (low priority)
|
|
{type = "SNOW", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "XMAS", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "SNOWLIGHT", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "BLIZZARD", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "HALLOWEEN", chance = 0}, -- % chance of getting this weather (disabled)
|
|
},
|
|
['sandy'] = {
|
|
-- The sum of all chance fields can't be higher than 100
|
|
{type = "EXTRASUNNY", chance = 40}, -- % chance of getting this weather (high priority)
|
|
{type = "CLEAR", chance = 30}, -- % chance of getting this weather (high priority)
|
|
{type = "CLOUDS", chance = 10}, -- % chance of getting this weather (medium priority)
|
|
{type = "OVERCAST", chance = 5}, -- % chance of getting this weather (low priority)
|
|
{type = "RAIN", chance = 2}, -- % chance of getting this weather (rare in desert)
|
|
{type = "FOGGY", chance = 3}, -- % chance of getting this weather (low priority)
|
|
{type = "SMOG", chance = 5}, -- % chance of getting this weather (medium priority)
|
|
{type = "CLEARING", chance = 5}, -- % chance of getting this weather (low priority)
|
|
{type = "THUNDER", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "SNOW", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "XMAS", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "SNOWLIGHT", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "BLIZZARD", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "HALLOWEEN", chance = 0}, -- % chance of getting this weather (disabled)
|
|
},
|
|
['cayo'] = {
|
|
-- The sum of all chance fields can't be higher than 100
|
|
{type = "EXTRASUNNY", chance = 30}, -- % chance of getting this weather (high priority)
|
|
{type = "CLEAR", chance = 25}, -- % chance of getting this weather (high priority)
|
|
{type = "CLOUDS", chance = 15}, -- % chance of getting this weather (medium priority)
|
|
{type = "OVERCAST", chance = 10}, -- % chance of getting this weather (medium priority)
|
|
{type = "RAIN", chance = 10}, -- % chance of getting this weather (possible in tropical climate)
|
|
{type = "FOGGY", chance = 5}, -- % chance of getting this weather (low priority)
|
|
{type = "CLEARING", chance = 5}, -- % chance of getting this weather (low priority)
|
|
{type = "SMOG", chance = 0}, -- % chance of getting this weather (disabled for tropical climate)
|
|
{type = "THUNDER", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "SNOW", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "XMAS", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "SNOWLIGHT", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "BLIZZARD", chance = 0}, -- % chance of getting this weather (disabled)
|
|
{type = "HALLOWEEN", chance = 0}, -- % chance of getting this weather (disabled)
|
|
},
|
|
}
|
|
|
|
function dbug(...)
|
|
if Config.Debug then print ('^3[DEBUG]^7', ...) end
|
|
end |