A modern and lightweight FiveM script that allows players to flip overturned vehicles using any framework, ox_lib, and ox_target integration.
- ✅ Complete ox_target integration: Intuitive interaction using "third-eye" system
- ✅ Automatic detection: Only shows option when vehicle is actually flipped
- ✅ Safety checks: Verifies no players inside vehicle before flipping
- ✅ JSON configuration: Easy customization without touching code
- ✅ Multi-language support: Locale system using JSON format
- ✅ Optimized performance: Efficient for high-population servers
- FiveM Server
- QBox Framework (qbx_core)
- ox_lib (v3.0.0 or higher)
- ox_target (v1.0.0 or higher)
-
Download the script and place it in your
resourcesfolder -
Add to your
server.cfg:ensure dadi_flip
-
Ensure dependencies are loaded in correct order:
ensure ox_lib ensure ox_target ensure dadi_flip
| Parameter | Type | Description | Default Value |
|---|---|---|---|
flipingTime |
number | Animation duration in milliseconds | 15000 |
maxDistance |
number | Maximum interaction distance | 2 |
minFlipAngle |
number | Minimum angle to detect flipped vehicle | 75.0 |
allowFlipWithPlayers |
boolean | Allow flipping with players inside | false |
targetLabel |
string | Text displayed in ox_target | "Flip Vehicle" |
targetIcon |
string | FontAwesome icon for ox_target | "fa-solid fa-car-crash" |
The script supports multiple languages using JSON files. Currently available:
- 🇪🇸 Spanish (
es.json) - 🇺🇸 English (
en.json)
- Create a new JSON file in the
locales/folder (e.g.,fr.json) - Copy the structure from existing locale files
- Translate the values
- Update the language loading in
client.lua
- Find a flipped vehicle on the map
- Approach the vehicle (within configured distance)
- Aim at the vehicle with ox_target (eye/third-eye)
- Select "Flip Vehicle" from the menu
- Wait for the animation to complete
-- Modern method (recommended)
exports['your-script']:FlipVehicle(vehicleEntity, skipProgressBar)
-- Legacy method (deprecated)
exports['your-script']:flipVehicle(vehicleEntity, skipProgressBar)- Detection System: Continuously monitors vehicle roll and pitch angles
- Safety Checks: Ensures no players are inside before allowing flip
- ox_target Integration: Dynamically shows/hides target option based on vehicle state
- Progress Bar: Uses ox_lib progress bar with cancelable animation
- Notification System: Integrated with QBox notification system
- Player Detection: Prevents flipping vehicles with players inside
- Distance Validation: Ensures player is close enough to interact
- Angle Calculation: Accurate detection of overturned vehicles
- Resource Cleanup: Automatically removes target options on resource stop
- Conditional Targeting: Only processes when vehicle is actually flipped
- Efficient Calculations: Minimal computational overhead
- Memory Management: Proper cleanup and resource management
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
- Follow existing code style
- Add comments for complex logic
- Test thoroughly before submitting
- Update documentation if needed
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: Use GitHub Issues for bug reports
- Feature Requests: Use GitHub Issues with enhancement label
- Questions: Join our Discord community
- Overextended - For ox_lib and ox_target
- Contributors - Thanks to all contributors
- remove qbox dependence
- change notify system to ox_lib notify
- Initial release
- ox_target integration
- JSON configuration system
- Multi-language support
Made with ❤️ for the FiveM community