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
- Drag the
dh-vehicledamagefolder into your server'sresourcesdirectory. - Add the following line to your
server.cfg:
ensure dh-vehicledamage
- Make sure
qb-coreandoxmysqlare running. - 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)
- Player owns or enters a vehicle.
- The vehicle receives damage from collisions and normal gameplay.
- DH Vehicle Damage detects changes to the vehicle's condition.
- Vehicle damage is saved to the appropriate vehicle record.
- Player parks or leaves the vehicle.
- The server restarts or the player reconnects.
- The vehicle retains its previously saved damage.
- 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