Skip to content

TeamDynamic-Scripts/dynamic-antivehicleroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynamic-antivehicleroll

By Dynamic Scripts

Disables GTA V's default mid-air vehicle pitch and roll steering inputs, preventing players from using controls to self-right or spin their vehicle during jumps and collisions. Players can still naturally rock and flip their vehicle back over when on the ground.


Features

  • Suppresses mid-air roll and pitch steering every frame while airborne
  • Ground recovery preserved — players can still rock an upside-down vehicle back over
  • Exempt by vehicle class (motorcycles and bicycles by default)
  • Exempt by model name (individual addon vehicle spawn names)
  • Exempt by vehicle type string (custom addon vehicle categories via GetVehicleType)
  • Fully configurable via config.lua
  • Standalone — no framework dependency

Installation

  1. Drop dynamic-antivehicleroll into your server's resources folder
  2. Add ensure dynamic-antivehicleroll to your server.cfg
  3. Restart your server or ensure dynamic-antivehicleroll in the console

Configuration

-- Enable or disable the script entirely
Config.EnableAirControl = true

-- Minimum height (metres) before air controls are suppressed
-- Prevents false triggers on kerbs and rough terrain
Config.AirHeightThreshold = 0.5

-- Exempt vehicle classes (GTA V class IDs)
Config.ExemptClasses = {
    [8]  = true,   -- Motorcycles
    [13] = true,   -- Bicycles
}

-- Exempt specific addon vehicle model names (spawn name, lowercase)
Config.ExemptModels = {
    -- 'go_kart',
}

-- Exempt custom vehicle type strings (from GetVehicleType())
-- For servers using addon vehicle categories
Config.ExemptTypes = {
    -- 'moto300',
}

How It Works

GTA V allows players to steer (roll/yaw/pitch) their vehicle while airborne, making it possible to spin the car mid-air and land upright. This script disables those inputs every frame while the vehicle is off the ground, so the vehicle's orientation on landing is determined by physics rather than player input.

The script distinguishes between genuinely airborne (all wheels off the ground, height above threshold) and upside-down on the ground (resting on roof, height under 1.5m). The latter is excluded from suppression so players retain the ability to rock their vehicle back onto its wheels without calling a mechanic.


Credits

Developed by Dynamic Scripts


License & Contributing

This resource is source-available, all rights reserved under the Dynamic Scripts Proprietary License. You may view the code, but you may not redistribute, resell, or publish modified or "improved" versions.

Found a bug, fix, or improvement? Please don't fork or republish - instead DM the author at wax@waxthe.dev, and it may be incorporated (with credit).

About

Disables mid-air vehicle roll/pitch self-righting during jumps and flips in FiveM.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages