Persistent Vehicle Damage and Saving

Persistent Vehicle Damage and Saving

$3.99

Add to Basket

DH Vehicle Damage β€” QBCore Standalone Script

Make vehicle damage matter with realistic impact damage, persistent vehicle health, and server-wide damage tracking.

Author: Drifters Haven

πŸ“Œ Overview

DH Vehicle Damage is a lightweight, server-wide vehicle damage system designed for QBCore servers that want vehicles to feel more realistic and damage to actually matter.

The script increases the impact and mechanical damage vehicles receive from collisions while automatically tracking and saving vehicle damage. Vehicle condition is preserved even when players disconnect or the server restarts, preventing players from simply abandoning a damaged vehicle and waiting for a restart to get it back to full health.

Instead, damaged vehicles stay damaged until they are properly repaired.

The system is designed to work server-wide, meaning you don't need to manually configure thousands of individual vehicles.

This is NOT a simple β€œmake vehicles weaker” script.

DH Vehicle Damage was built with:

βœ” More realistic collision damage
βœ” Persistent vehicle damage
βœ” Damage saved across restarts
βœ” Server-wide vehicle handling
βœ” No need to configure individual vehicles
βœ” Automatic damage tracking
βœ” Prevents restart-based vehicle repair exploits
βœ” Lightweight client/server processing
βœ” Designed for long-term RP vehicle ownership

Perfect for serious RP servers, economy-focused servers, survival servers, or any community where vehicle ownership, maintenance, and realistic consequences matter.

✨ Key Features

βœ” Realistic Collision Damage: Vehicles receive increased damage when hitting other vehicles, objects, buildings, terrain, and other obstacles.

βœ” Server-Wide Damage System: Apply realistic damage behavior across your entire vehicle fleet without having to edit individual vehicle configurations.

βœ” Persistent Vehicle Health: Vehicle damage is tracked and saved so players cannot simply leave a damaged vehicle and wait for a server restart to restore it.

βœ” Restart-Proof Damage: Vehicle condition remains damaged after server restarts, resource restarts, and player reconnects.

βœ” Automatic Damage Tracking: The system continuously monitors vehicle condition and records changes without requiring players to manually save anything.

βœ” Vehicle Ownership Integration: Designed to work with owned vehicles so damage can be associated with the correct vehicle and preserved between sessions.

βœ” No Individual Vehicle Setup: You don't need to add thousands of vehicle models to a configuration file. The system is designed to handle vehicles globally.

βœ” Damage Persistence: Engine and vehicle health can be preserved rather than allowing vehicles to magically return to perfect condition.

βœ” Encourages Vehicle Maintenance: Players have a reason to repair and maintain their vehicles instead of abusing server restarts as a free repair service.

βœ” Lightweight: Built with performance in mind and designed to avoid unnecessary heavy server processing.

βœ” Easy Configuration: Adjust the damage multiplier and other behavior from a simple configuration file.

πŸ“¦ Included Files

client.lua
server.lua
config.lua
fxmanifest.lua
README.txt (this file)

🧩 Dependencies

Required: qb-core

Database: oxmysql

The script is designed to integrate with QBCore's vehicle ownership system.

πŸ”§ Installation

  1. Drag the dh-vehicledamage folder into your server's resources directory.
  2. Add the following line to your server.cfg:

ensure dh-vehicledamage

  1. Make sure qb-core and oxmysql are running.
  2. Restart your server.

πŸ“ Configuration

All configuration options are located in config.lua.

You can customize options such as:

  • Vehicle damage multiplier
  • Collision damage behavior
  • Damage update frequency
  • Vehicle health thresholds
  • Save behavior
  • Additional vehicle damage settings

The system is designed to work globally, so you don't need to maintain a massive vehicle list.

πŸ•Ή How It Works (In-Game)

  1. Player owns or enters a vehicle.
  2. The vehicle receives damage from collisions and normal gameplay.
  3. DH Vehicle Damage detects changes to the vehicle's condition.
  4. Vehicle damage is saved to the appropriate vehicle record.
  5. Player parks or leaves the vehicle.
  6. The server restarts or the player reconnects.
  7. The vehicle retains its previously saved damage.
  8. The player must properly repair the vehicle to restore its condition.

Example

A player crashes their vehicle and leaves it heavily damaged.

Normally, they could simply leave the vehicle out, wait for a server restart, and potentially return to a fully healthy vehicle.

DH Vehicle Damage prevents this.

The vehicle's damaged condition is saved and restored, meaning the player needs to actually repair the vehicle before it returns to proper condition.

πŸ§ͺ Performance & Stability

  • Designed for server-wide vehicle coverage
  • No individual vehicle configuration required
  • Lightweight client-side damage monitoring
  • Server-side persistence for owned vehicles
  • Damage is saved automatically
  • Designed for long-uptime servers
  • Prevents unnecessary vehicle health resets
  • Clean handling of vehicle state changes
  • Built with large vehicle fleets in mind

βš™οΈ Vehicle Damage & Persistence

DH Vehicle Damage is intended to complement your existing vehicle repair system.

The script handles damage and persistence, while your server's existing mechanic, repair shop, mechanic job, or repair script can handle actually restoring the vehicle.

This allows server owners to create a more meaningful vehicle economy where crashes have consequences and vehicle maintenance becomes part of normal gameplay.

πŸ”’ For License Owners

You are allowed to:

βœ” Edit, customize, and expand the script
βœ” Modify client/server logic for your server's needs
βœ” Integrate the script with your existing mechanic and repair systems

You may NOT:

✘ Resell, redistribute, or repackage this script
✘ Share the script files with others
✘ Upload the script to GitHub or other repositories
✘ Sell modified versions
✘ Claim authorship of this script

Β© Drifters Haven β€” All Rights Reserved