Configuration
All configuration for legends_driveby is done in the config.lua file. The configuration is divided into three main sections: POV Settings, Vehicle Access, and Offset Settings.
Configuration File Structure
Location: config.lua
Config = {
POVSettings = { ... },
VehicleAccess = { ... },
OffsetSettings = { ... }
}POV Settings
Controls camera behavior during drive-by mode and regular vehicle shooting.
ForceFirstPersonInDriveby
POVSettings = {
ForceFirstPersonInDriveby = true,
}Description: Forces players into first-person camera view while in drive-by mode.
Type: boolean
Default: true
| Value | Behavior |
|---|---|
true | Camera locked to first-person during drive-by |
false | Players can use any camera angle during drive-by |
ForceFirstPersonInVehicle
POVSettings = {
ForceFirstPersonInVehicle = false,
}Description: Forces first-person view when shooting from inside vehicles (when NOT in drive-by mode).
Type: boolean
Default: false
This setting only affects regular vehicle shooting, not the custom drive-by system.
DisableVehicleShooting
POVSettings = {
DisableVehicleShooting = false
}Description: Completely disables the default GTA vehicle shooting. When enabled, players can only shoot from vehicles using the drive-by system.
Type: boolean
Default: false
| Value | Behavior |
|---|---|
true | Default vehicle shooting disabled; must use drive-by system |
false | Both default shooting and drive-by system available |
Vehicle Access
Controls which vehicles can use the drive-by feature.
GlobalSettings
VehicleAccess = {
GlobalSettings = true,
}Description: Determines the access mode for vehicles.
Type: boolean
Default: true
| Value | Mode | Behavior |
|---|---|---|
true | Blacklist Mode | All vehicles allowed EXCEPT those in BlacklistedVehicles |
false | Whitelist Mode | ONLY vehicles in WhitelistedVehicles are allowed |
WhitelistedVehicles
VehicleAccess = {
WhitelistedVehicles = {
-664141241, -- krieger
970598228, -- sultan
-1216765807 -- adder
},
}Description: List of vehicle hashes that CAN use drive-by when GlobalSettings = false.
Type: table (array of vehicle hashes)
Default: Contains krieger, sultan, and adder as examples
Only used when GlobalSettings = false (whitelist mode).
BlacklistedVehicles
VehicleAccess = {
BlacklistedVehicles = {
-331467772, -- italigto
},
}Description: List of vehicle hashes that CANNOT use drive-by when GlobalSettings = true.
Type: table (array of vehicle hashes)
Default: Contains italigto as an example
Only used when GlobalSettings = true (blacklist mode).
BlockedVehicleClasses
VehicleAccess = {
BlockedVehicleClasses = {
8, -- Motorcycles
13, -- Cycles (Bicycles)
14, -- Boats
15, -- Helicopters
16, -- Planes
22, -- Open Wheel
}
}Description: Vehicle classes that are always blocked from using drive-by, regardless of whitelist/blacklist settings.
Type: table (array of vehicle class IDs)
Default: Blocks motorcycles, bicycles, boats, helicopters, planes, and open wheel vehicles
| Class ID | Vehicle Type |
|---|---|
| 0 | Compacts |
| 1 | Sedans |
| 2 | SUVs |
| 3 | Coupes |
| 4 | Muscle |
| 5 | Sports Classics |
| 6 | Sports |
| 7 | Super |
| 8 | Motorcycles |
| 9 | Off-road |
| 10 | Industrial |
| 11 | Utility |
| 12 | Vans |
| 13 | Cycles |
| 14 | Boats |
| 15 | Helicopters |
| 16 | Planes |
| 17 | Service |
| 18 | Emergency |
| 19 | Military |
| 20 | Commercial |
| 21 | Trains |
| 22 | Open Wheel |
Offset Settings
Controls player positioning when in drive-by mode.
DebugCommand
OffsetSettings = {
DebugCommand = false,
}Description: Enables the /GetVehicleHash command for finding vehicle hashes.
Type: boolean
Default: false
When enabled, use /GetVehicleHash while inside a vehicle to print the vehicle's hash to the F8 console.
DefaultOffsets
OffsetSettings = {
DefaultOffsets = {
[0] = { x = 0.5, y = 0.0, z = 0.75, rotation = 30.0, bone = "seat_pside_f" }, -- Front Right
[1] = { x = -0.5, y = 0.0, z = 0.75, rotation = -30.0, bone = "seat_dside_r" }, -- Rear Left
[2] = { x = 0.5, y = 0.0, z = 0.75, rotation = 30.0, bone = "seat_pside_r" }, -- Rear Right
},
}Description: Default position offsets applied to all vehicles unless overridden.
Type: table (indexed by seat number)
Seat Index Reference:
| Index | Seat Position |
|---|---|
| -1 | Driver (cannot use drive-by) |
| 0 | Front Passenger |
| 1 | Rear Left |
| 2 | Rear Right |
| 3+ | Additional seats |
Offset Properties:
| Property | Type | Description |
|---|---|---|
x | number | Left/right offset (positive = right) |
y | number | Forward/backward offset (positive = forward) |
z | number | Up/down offset (positive = up) |
rotation | number | Player rotation in degrees |
bone | string | Vehicle bone to attach to |
Common Bone Names:
seat_pside_f- Front passenger seatseat_dside_r- Rear driver-side seatseat_pside_r- Rear passenger-side seat
VehicleOffsets
OffsetSettings = {
VehicleOffsets = {
-- Example using GetHashKey
[GetHashKey("adder")] = {
[0] = { x = 0.6, y = 0.0, z = 0.8, rotation = 35.0, bone = "seat_pside_f" },
},
-- Example using hardcoded hash
[-664141241] = { -- krieger
[0] = { x = 0.5, y = 0.1, z = 0.7, rotation = 25.0, bone = "seat_pside_f" },
},
}
}Description: Vehicle-specific offsets that override DefaultOffsets for specific vehicles.
Type: table (indexed by vehicle hash, then by seat number)
Use vehicle-specific offsets for:
- Right-hand drive vehicles
- Vehicles with unique window shapes
- Vehicles where default positioning looks incorrect
Getting Vehicle Hashes
There are two ways to get a vehicle's hash:
Method 1: Debug Command
- Set
DebugCommand = truein config - Enter the vehicle in-game
- Type
/GetVehicleHashin chat - Check F8 console for the hash
Method 2: Lua Function
Use GetHashKey("vehicle_spawn_name") directly in the config:
[GetHashKey("adder")] = { ... }Example Configurations
Whitelist Mode (Specific Vehicles Only)
VehicleAccess = {
GlobalSettings = false,
WhitelistedVehicles = {
GetHashKey("sultan"),
GetHashKey("kuruma"),
GetHashKey("schafter2"),
},
BlockedVehicleClasses = {
8, 13, 14, 15, 16, 22
}
}Immersive Roleplay Setup
POVSettings = {
ForceFirstPersonInDriveby = true,
ForceFirstPersonInVehicle = true,
DisableVehicleShooting = true -- Only allow custom drive-by
}Need Help?
Join our Discord for support: discord.gg/lgnds (opens in a new tab)