Configuration
Learn how to configure Legends Drive-by for your server's specific needs.
Basic Configuration
The main configuration is located in /config/config.lua. Here's a complete breakdown of all of the settings.
Vehicle offsets
Global Offsets
These are the default offets that will be applied to all vehicles. If you want to apply custom offsets for certain vehicles use the specific vehicles settings.
DefaultSettings = {
{ -- Seat 2
Offset = {xPos = 0.0+0.9, yPos = 0.0+0.1, zPos = 0.0+0.7},
Rotation = {xRot = 0.0, yRot = 30.0, zRot = 10.0}
},
{ -- Seat 3
Offset = {xPos = 0.0-0.8, yPos = 0.0-0.68, zPos = 0.0+0.8},
Rotation = {xRot = 0.0, yRot = -30.0, zRot = 0.0}
},
{ -- Seat 4
Offset = {xPos = 0.0+0.9, yPos = 0.0-0.68, zPos = 0.0+0.7},
Rotation = {xRot = 0.0, yRot = 30.0, zRot = 0.0}
}
}Offsets for specific vehicles
Config.Vehicles = { -- Settings for specific vehicle (right wheeled vehicles, cars with different shaped windows etc.)
{ -- rx7
CarHash = -285576169,
{ -- Seat 2
Offset = {xPos = 0.0-0.8, yPos = 0.0-.38, zPos = 0.0+0.4},
Rotation = {xRot = 0.0, yRot = -30.0, zRot = 0.0}
}
},
{ -- animfk8hr
CarHash = 626972477,
{ -- Seat 2
Offset = {xPos = 0.0-0.8, yPos = 0.0-.18, zPos = 0.0+1.0},
Rotation = {xRot = 0.0, yRot = -30.0, zRot = 0.0}
},
{ -- Seat 3
Offset = {xPos = 0.0+0.9, yPos = 0.0-0.9, zPos = 0.0+1},
Rotation = {xRot = 0.0, yRot = 30.0, zRot = 0.0}
},
{ -- Seat 4
Offset = {xPos = 0.0-0.9, yPos = 0.0-0.9, zPos = 0.0+1},
Rotation = {xRot = 0.0, yRot = -30.0, zRot = 0.0}
}
}
}You can get the Carhash by typing GetVehicleHash while inside of a car after setting EnableCommand to true. Then you can adjust the offsets for your specific needs wether that is right wheeled vehicles or ones with specific alightments.
Anti-exploit protection
Config.MaxDistance = 1.7Prevents returning to the vehicle if the player's find a way to exit from driveby mode and abuse the sytem to teleport to the vehicle instantly.
Vehicle Whitelisting
Control which vehicles can use driveby mode with three configuration options:
Config.GlobalSettings = true -- true: all vehicles allowed, false: apply restrictions
Config.WhitelistMode = true -- Only when GlobalSettings=false. true: whitelist mode, false: blacklist modeConfiguration modes:
GlobalSettings = true: All vehicles can use driveby (default)GlobalSettings = false+WhitelistMode = true: Only whitelisted vehicles allowedGlobalSettings = false+WhitelistMode = false: All vehicles allowed except blacklisted
Config.WhitelistedVehicles = {
626972477, -- animfk8hr
-285576169, -- rx7
}
Config.BlacklistedVehicles = {
-- Add vehicle hashes to block
}Other settings
EnableCommand = true,Enables the GetVehicleHash command used for getting a vehicles hash for setting up specific offset settings.
Keybind = 'G',Changes the default keybind for entering / exiting drive-by mode. Keep in mind that changing this will only apply it to new players, other's will have to change it manually from ESC -> Settings -> Keybinds -> FiveM
Need Help?
Join our Discord for support: discord.gg/lgnds (opens in a new tab)