Natural Disasters
A comprehensive natural disaster system for FiveM servers featuring dynamic weather, blackouts, and multiple disaster types.
Overview
Section titled “Overview”Natural Disasters is a comprehensive weather and disaster system that brings dynamic environmental challenges to your FiveM server. The system includes multiple disaster types, weather synchronization, blackout mechanics, and seamless integration with popular sound systems.
Key Features
Section titled “Key Features”- Multiple Disaster Types - Tornadoes, earthquakes, tsunamis, and more
- Dynamic Weather System - Built-in weather and time management
- Blackout Mechanics - Realistic power outages during disasters
- Sound Integration - Support for xSound and PlayCustomSounds
- Framework Compatibility - Works with ESX, QBCore, and standalone setups
- OneSync Compatible - Legacy and Infinity support
- DLC Expansion - 5 additional content packs available
- Lightweight - Minimal performance impact
- Escrow Protection - Secure resource protection
Purchase Information
Section titled “Purchase Information”DLC Packs:
Requirements
Section titled “Requirements”- Base resource required for DLC 1
- DLC 1 required for DLC 2
- DLC 2 required for DLC 3
- DLC 3 required for DLC 4
- DLC 4 required for DLC 5
Installation Notice
Section titled “Installation Notice”Got all of the Natural Disasters? Install just DLC5, this contains all code required. The latest resource is the one you install! The pack includes Air Raid Sirens which you can separately install.
Video Showcase
Section titled “Video Showcase”Watch the video showcase:
- ND - Base Video Showcase
- ND - DLC 1 Video Showcase
- ND - DLC 2 Video Showcase
- ND - DLC 3 Video Showcase
- ND - DLC 4 Video Showcase
- ND - DLC 5 Video Showcase
Installation Process
Section titled “Installation Process”Step 1: Download Resource
Section titled “Step 1: Download Resource”Download this resource via CFX Portal Assets after purchasing.
Step 2: Sound System Setup (Optional)
Section titled “Step 2: Sound System Setup (Optional)”If you are using the built-in sound system, skip this step and proceed to resource installation.
-
Download Sound Resources:
- xSound - Download fresh from GitHub
- PlayCustomSounds - Download fresh from GitHub
-
Install Sound Resources:
- Drag “PlayCustomSounds” and/or “xsound” into your
/resources/folder - If using Air Raid Sirens integration, you’ll need both resources
- Drag “PlayCustomSounds” and/or “xsound” into your
-
Configure Server.cfg:
ensure xsound- xSound must be placed high in server.cfg
- Download fresh from GitHub for best compatibility
-
Add Sound Files:
- Copy
.oggsound files from theSoundFilesfolder (in your purchased resource) - Add them to your chosen sound resource
- For xSound: Update
c_functions.luawith your desired sound URL
- Copy
-
Configure Dependencies:
- If using xSound: Add
dependency 'xsound'to fxmanifest.lua - If not using xSound: Comment out or remove the dependency line
- Example:
-- dependency 'xsound'
- If using xSound: Add
Step 3: Install Resource
Section titled “Step 3: Install Resource”- Install only the latest DLC you own!
- Note: If installing DLC upon the base edition, replace the base resource completely
- Configure
natural_disasters/config/config.luafor customization - Add to server.cfg:
ensure night_natural_disasters
- Make sure you have only ONE weather and time system active in your server. (Recommended to use the built in & delete any others)
- Restart the server.
Configuration
Section titled “Configuration”Permissions
Section titled “Permissions”Choose from multiple permission systems:
- Discord API: Discord API Documentation
- Ace Permissions: Ace Permissions Documentation
- Framework Groups: Configure QBCore or ESX group names
- Everyone: Default setting (no restrictions)
Weather Compatibility
Section titled “Weather Compatibility”Using Built-in Weather System
Section titled “Using Built-in Weather System”- Remove/disable other weather/time systems on your server
- Built-in system handles all weather and time management
Using External Weather Systems
Section titled “Using External Weather Systems”- Disable built-in weather in config.lua
- Use compatible weather scripts:
- qb-weathersync
- cd_easytime
- vSyncR
Free Weather Script Edits: Available in our Discord #free-files channel (requires @Customer role)
Sound File Management
Section titled “Sound File Management”Adding Disaster Sound Files
Section titled “Adding Disaster Sound Files”- Navigate to
NUI/sounds/folder - Add your
.oggsound file - Configure filename (without .ogg extension) in
config/config.lua
Adding Air Raid Siren Sound Files
Section titled “Adding Air Raid Siren Sound Files”- Navigate to
night_air_raid_sirens/NUI/sounds/folder - Add your sound file
- Configure in main config:
SoundFileNameForAirRaidSirens = "yourfilename"
Exports
Section titled “Exports”Server-side Exports
Section titled “Server-side Exports”-- Disaster Managementexports.night_natural_disasters:SpawnDisaster(id)exports.night_natural_disasters:StopDisaster(id)
-- Weather & Time Controlexports.night_natural_disasters:NextWeatherStage()exports.night_natural_disasters:SetWeather(weatherType)exports.night_natural_disasters:SetTime(hour, minute)
-- System Togglesexports.night_natural_disasters:ToggleBlackout()exports.night_natural_disasters:ToggleFreezeTime()exports.night_natural_disasters:ToggleDynamicWeather()
-- Status Checksexports.night_natural_disasters:GetCurrentWeather() -- returns "EXTRASUNNY" for example (string)exports.night_natural_disasters:GetIsBlackoutActive() -- returns true or false (boolean)exports.night_natural_disasters:GetIsTimeFrozen() -- returns true or false (boolean)exports.night_natural_disasters:GetIsWeatherDynamic() -- returns true or false (boolean)
-- External Sound Integrationexports[Config.Integrations.CustomSoundResource]:StartExternalSound(coords, disasterID, soundFileName, soundFileVolume)Client-side Exports
Section titled “Client-side Exports”-- Synchronization Controlexports.night_natural_disasters:PauseSynchronization(boolean) -- Used by housing system scripts for weather & disaster proof interiors.Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”-
Parsing Errors in F8 Console
- Ensure you follow the exact file transfer order
- Use binary FTP transfer mode
- Don’t rename the script
-
Weather Flickering
- Disable conflicting weather systems
- Use our free weather script edits from Discord
- Ensure proper weather compatibility
-
Sound Issues
- Verify sound files are in correct format (.ogg)
- Check file paths in configuration
- Ensure sound resource is properly installed
-
Permission Problems
- Verify Discord API setup
- Check Ace permissions configuration
- Confirm framework group names
Best Practices
Section titled “Best Practices”-
Installation Order
- Always install the latest DLC version
- Remove older versions completely
- Install Air Raid Sirens separately if needed
-
Configuration
- Read through config.lua thoroughly
- Test settings on a development server first
- Backup configurations before major changes
-
Performance
- Monitor server performance during disasters
- Adjust disaster frequency as needed
- Use appropriate sound file sizes
Related Resources
Section titled “Related Resources”Recommended Additions
Section titled “Recommended Additions”- Air Raid Sirens - Enhanced disaster atmosphere
- Discord API - Role-based permissions
- Ace Permissions - Advanced permission system
Installation Order
Section titled “Installation Order”Support
Section titled “Support”Documentation
Section titled “Documentation”- Review this guide thoroughly before seeking support
- Check configuration settings carefully
- Verify all prerequisites are met
Community Support
Section titled “Community Support”Join our Discord community for assistance:
Technical Support
Section titled “Technical Support”- Create a ticket in our Discord support system
- Provide detailed error messages and configuration
- Include server logs when possible