Natural Disasters Resource

Natural Disasters

A comprehensive natural disaster system for FiveM servers featuring dynamic weather, blackouts, and multiple disaster types.


πŸ“‹ Table of Contents

  1. 🎯 Overview
  2. πŸ›’ Purchase Information
  3. πŸ“Ί Video Showcase
  4. πŸ“¦ Installation Process
  5. βš™οΈ Configuration
    1. Using Built-in Weather System
    2. Using External Weather Systems
    3. Adding Disaster Sound Files
    4. Adding Air Raid Siren Sound Files
  6. πŸ”§ Exports
  7. πŸ”§ Troubleshooting
  8. πŸ”— Related Resources
  9. πŸ†˜ Support

🎯 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

  • βœ… 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

Get Natural Disasters for FiveM:

Base: Purchase on Nights Software Store

DLC Packs:

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

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

Watch the video showcase:

Video Showcase


πŸ“¦ Installation Process

Step 1: Download Resource

Download this resource via CFX Portal Assets after purchasing.

Step 2: Sound System Setup (Optional)

If you are using the built-in sound system, skip this step and proceed to resource installation.

  1. Download Sound Resources:
  2. Install Sound Resources:
    • Drag β€œPlayCustomSounds” and/or β€œxsound” into your /resources/ folder
    • If using Air Raid Sirens integration, you’ll need both resources
  3. Configure Server.cfg:
    ensure xsound
    
    • xSound must be placed high in server.cfg
    • Download fresh from GitHub for best compatibility
  4. Add Sound Files:
    • Copy .ogg sound files from the SoundFiles folder (in your purchased resource)
    • Add them to your chosen sound resource
    • For xSound: Update c_functions.lua with your desired sound URL
  5. 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'

Step 3: Install Resource

Important: Follow this exact order to avoid parsing errors:

  1. Unpack ZIP package in a local folder
  2. Set FTP transfer type to binary
  3. Drag files from local machine to server resources folder
  4. Add to server.cfg
  5. Boot server

  6. Drag the resource into your resources folder
    • Note: If installing DLC, replace the base resource completely
  7. Configure natural_disasters/config/config.lua for customization
  8. Add to server.cfg:
    ensure night_natural_disasters
    

βš™οΈ Configuration

Permissions

Choose from multiple permission systems:

  1. Discord API: Discord API Documentation
  2. Ace Permissions: Ace Permissions Documentation
  3. Framework Groups: Configure QBCore or ESX group names
  4. Everyone: Default setting (no restrictions)

Weather Compatibility

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

  • 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

Adding Disaster Sound Files

  1. Navigate to NUI/sounds/ folder
  2. Add your .ogg sound file
  3. Configure filename (without .ogg extension) in config/config.lua

Adding Air Raid Siren Sound Files

  1. Navigate to night_air_raid_sirens/NUI/sounds/ folder
  2. Add your sound file
  3. Configure in main config: SoundFileNameForAirRaidSirens = "yourfilename"

πŸ”§ Exports

Server-side Exports

-- Disaster Management
exports.night_natural_disasters:SpawnDisaster(id)
exports.night_natural_disasters:StopDisaster(id)

-- Weather & Time Control
exports.night_natural_disasters:NextWeatherStage()
exports.night_natural_disasters:SetWeather(weatherType)
exports.night_natural_disasters:SetTime(hour, minute)

-- System Toggles
exports.night_natural_disasters:ToggleBlackout()
exports.night_natural_disasters:ToggleFreezeTime()
exports.night_natural_disasters:ToggleDynamicWeather()

-- Status Checks
exports.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 Integration
exports[Config.Integrations.CustomSoundResource]:StartExternalSound(coords, disasterID, soundFileName, soundFileVolume)

Client-side Exports

-- Synchronization Control
exports.night_natural_disasters:PauseSynchronization(boolean) -- Used by housing system scripts for weather & disaster proof interiors.

πŸ”§ Troubleshooting

Common Issues

  1. Parsing Errors in F8 Console
    • Ensure you follow the exact file transfer order
    • Use binary FTP transfer mode
    • Don’t rename the script
  2. Weather Flickering
    • Disable conflicting weather systems
    • Use our free weather script edits from Discord
    • Ensure proper weather compatibility
  3. Sound Issues
    • Verify sound files are in correct format (.ogg)
    • Check file paths in configuration
    • Ensure sound resource is properly installed
  4. Permission Problems
    • Verify Discord API setup
    • Check Ace permissions configuration
    • Confirm framework group names

Best Practices

  1. Installation Order
    • Always install the latest DLC version
    • Remove older versions completely
    • Install Air Raid Sirens separately if needed
  2. Configuration
    • Read through config.lua thoroughly
    • Test settings on a development server first
    • Backup configurations before major changes
  3. Performance
    • Monitor server performance during disasters
    • Adjust disaster frequency as needed
    • Use appropriate sound file sizes

Installation Order

  1. DLC 5 (contains all previous content) - Purchase
  2. Air Raid Sirens (optional integration) - Purchase

πŸ†˜ Support

Documentation

  • Review this guide thoroughly before seeking support
  • Check configuration settings carefully
  • Verify all prerequisites are met

Community Support

Join our Discord community for assistance:

Nights Software Discord

Technical Support

  • Create a ticket in our Discord support system
  • Provide detailed error messages and configuration
  • Include server logs when possible

Back to top

Copyright © 2025 Nights Software

Page last modified: January 22, 2025 at 12:00 AM.