RAPTOR – Vehicle Stability System for FiveM
Overview 🛠️
RAPTOR is a high-fidelity vehicle stability system for FiveM that simulates real-world ABS, TCS, and ESP systems with precision. Designed for realism and smooth in-game integration, RAPTOR improves vehicle handling during hard braking, acceleration, and cornering scenarios.
Features 🚀
- 🟥 ABS v3.0
- Per-wheel brake pulsing at ~20Hz
- Rear brake pressure bias (e.g. 70% rear)
- Slip-ratio based activation logic
- Realistic e-brake detection
- Smooth toggle in/out with UI indicator
- 🟩 TCS v2.1
- Slip ratio & steering angle-based torque cut
- Turning-aware slip detection
- Engine torque & power reduction based on intensity
- Emergency brake on extreme spin
- Dynamic UI indicator
- 🟨 ESP v3.3
- Slip angle threshold & smooth ramp logic
- Heading vs velocity vector analysis
- Brake intervention on individual wheels
- Realistic over/understeer handling
- Hysteresis & torque ramping with debugging
UI Indicators 📸
Each system (ABS, TCS, ESP) has a clean UI box that:
- Fades in on activation
- Displays status (Active/Inactive)
- Fades out on deactivation
These icons are controlled by the NUI messages sent from abs.lua
, tsc.lua
, and esp.lua
in the client/
folder.
Installation 📁
- Clone the repository to your local machine.
- Move the resource into your FiveM
resources/
folder. - Ensure the following files are in your
fxmanifest.lua
underclient_scripts
andui_page
: - Add
ensure raptor
to yourserver.cfg
.
client_scripts {
'client/abs.lua',
'client/tsc.lua',
'client/esp.lua'
}
ui_page 'nui/index.html'
files {
'nui/index.html',
'nui/config.js',
'nui/*.png'
}
Configuration ⚙️
All main tuning values are defined at the top of each script (abs.lua
, tsc.lua
, esp.lua
):
-- ABS parameters in abs.lua
-- TCS parameters in tsc.lua
-- ESP parameters in esp.lua
Debugging 🔍
Enable debug flags in each script to see real-time console logs:
- In
abs.lua
: setdebug = true
at top. - In
tsc.lua
: uncomment debug prints. - In
esp.lua
: debug prints are inShowESPUI
.
Scripts 📜
Client-side Lua scripts located in client/
:
abs.lua
— ABS logic & NUI integrationtsc.lua
— Traction control logic & NUI integrationesp.lua
— Stability control logic & NUI integration