> For the complete documentation index, see [llms.txt](https://god-studios.gitbook.io/god-studios/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://god-studios.gitbook.io/god-studios/god-nail-trap-system.md).

# GOD - Nail Trap System

**Dynamic Road Spike System**

### Overview

Take vehicle pursuits 🚗💨 and tactical gameplay to the next level with a fully interactive Nail Trap System! 🔥⚙️

The GOD - Nail Trap System is a comprehensive road spike solution designed for FiveM servers, providing realistic and immersive nail deployment mechanics for police pursuits, ambushes, and tactical roadblocks.

### Key Features

#### 🎯 Deployable Nails

* **Single-Use Nail (`screw_nail`)**: Deploys one spike at a time. Perfect for precise placement and strategic positioning. 🔹
  * **On Foot**: Plant nails directly at your location for roadblocks and ambushes
  * **In Vehicle**: Throw nails out the window while driving to disable pursuing vehicles! Perfect for illegal players escaping police chases 🚗💨
* **Multi-Throw Nail Package (`nailspackage`)**: Allows players to throw multiple spikes at once (up to 20 nails) for wider coverage. Ideal for creating effective roadblocks. 🔸

#### ⚡ Performance Optimized

* **0.00ms resmon usage** - Zero impact on server performance
* Efficient client-server synchronization
* Automatic cleanup system to prevent memory leaks
* Optimized collision detection for tire damage

#### 🔄 Framework Compatibility

* **QBCore** - Full support with native integration
* **ESX** - Complete compatibility with es\_extended
* **Qbox** - Full support for qbox\_core framework

#### 🎮 Inventory System Support

* **ox\_inventory** - Native integration with export functions
* **qb-inventory** - Full support with useable items

#### 🎯 Targeting System Support

* **ox\_target** - Recommended targeting system
* **qb-target** - Alternative targeting solution
* **interact** - Basic interaction system support

#### 🛣️ Realistic Mechanics

* Custom 3D nail prop that persists on the ground
* Physics-based nail placement with proper ground alignment
* Real-time tire damage calculation based on wheel contact
* Configurable damage per nail (default: 33.335% per nail)
* Automatic cleanup after configurable time (default: 10 minutes)

#### 🚗 Vehicle Interaction

* Detects contact between vehicle wheels and deployed nails
* Applies progressive tire damage based on nail contact
* Supports all 6 wheel positions (front, middle, rear - left and right)
* Instant tire burst when damage threshold is reached (100%)
* **Dynamic Pursuit Defense**: Throw nails from moving vehicles to disable pursuing vehicles' tires in real-time

### Use Cases

* **Police Pursuits**: Deploy spike strips to stop fleeing vehicles
* **Escape Tactics**: Illegal players can throw nails from vehicle windows to disable pursuing police vehicles during high-speed chases 🚨🚗
* **Roadblocks**: Create tactical barriers for checkpoints
* **Ambushes**: Set up traps for strategic gameplay
* **Roleplay Scenarios**: Enhance immersion with realistic road hazards

### Requirements

* **ox\_lib** - Required dependency for progress bars and notifications
* FiveM server with one of the supported frameworks
* Compatible inventory system (ox\_inventory or qb-inventory)
* Compatible targeting system (ox\_target, qb-target, or interact)

### Technical Details

* **Language**: Lua 5.4
* **Game**: GTA V (FiveM)
* **Resource Type**: Client & Server Script
* **Network Synchronization**: Full server-client sync for nail positions
* **Collision Detection**: Real-time wheel-to-nail distance calculation (0.5 unit threshold)

***

**Get ready to enhance your server's tactical gameplay with a system designed for realism and high-stakes action!** 🚨🚗
