☰ All guides
6-antilag V2
Anti-lag with exhaust flames, an in-game menu per vehicle, three modes, gear-shift pops and launch control.
Resource folder
six_antilag_v2
01Requirements
- ESX (1.1, 1.2 or Legacy) or QB-Core. The framework is detected automatically at start.
oxmysql
02Installation
- 01Sign in to the Cfx Portal with the account you bought with and download the script under Granted Assets.
- 02Unzip the download and move the folder
six_antilag_v2into theresourcesfolder of your server. Keep the folder name and upload every file, including the hidden.fxap. - 03QB-Core only: open
fxmanifest.luaand remove the line'@es_extended/imports.lua'. That file does not exist on a QB server and causes an error at start. - 04Add
ensure six_antilag_v2to yourserver.cfg, below your framework andoxmysql. - 05ESX: nothing else to do. On first start the script creates the table
antilagand the itemantilagin youritemstable by itself. QB-Core: the table is created automatically, the item is not. Add it toqb-core/shared/items.lua(see below). - 06Restart the server (or run
refreshand thenensurewith the folder name in the server console).
antilag = { name = 'antilag', label = 'Antilag', weight = 100, type = 'item', image = 'antilag.png', unique = false, useable = true, shouldClose = true, description = 'Antilag system for your vehicle' },
Good to know
ox_inventory: items are not read from the database. Add the item to ox_inventory/data/items.lua instead: ['antilag'] = { label = 'Antilag System', weight = 100 },
A successful start prints [six_antilag] Framework detected: esx (or qb) in the server console.
03How players use it
- 01Sit in the driver's seat and use the item
antilag. The system is installed in that vehicle and saved by plate. - 02Open the menu with SHIFT + N. There you pick the mode, flame size, RPM range, gear-shift antilag and launch control.
- 03To remove the system, use Uninstall in the menu.
Mode
- automatic
- Fires when you lift off the throttle inside the RPM range. With gear-shift antilag also on every upshift.
- manual
- Fires only while SHIFT is held.
- toggle
- SHIFT switches the antilag on and off.
Players can rebind the menu key themselves under Settings → Key Bindings → FiveM (entry “Open/Close Antilag UI”).
04Configuration
Everything is set in config.lua.
Option
- Hotkeys.UIPrimeKey
- Key that opens the menu together with the modifier. Default
N. Only the default for new players; existing players keep their own binding. - Hotkeys.UISecondKey
- Modifier for the menu as control ID. Default
21(SHIFT). - Hotkeys.ToggleKey
- Key for the modes manual and toggle. Default
21(SHIFT). - item
- Name of the install item.
- defaultSettings
- Values a freshly installed system starts with:
mode,flameSize,minRPM,maxRPM,antilagActive,gearShiftAntilag,launchControl. - permissions
- What players may change in the menu: RPM range, launch control, gear-shift antilag, flame size. Set an entry to
falseto lock it. - requireOwnerForInstall
true: only the vehicle owner can install.- requireOwnerForUninstall
true: only the vehicle owner can uninstall.- flameSizeMin / flameSizeMax
- Limits of the flame size slider (0.5 to 4.0).
- RPMLimitMin / RPMLimitMax
- Lowest and highest RPM a player can choose (1.0 = redline).
- minRPMDifference / maxRPMDifference
- Smallest and largest allowed gap between min and max RPM.
- Config.vehiclesTable
- QB-Core only: name of your vehicle table for the owner check. Default
player_vehicles. - Config.Language
"en"or"de". Texts are inConfig.Locals, menu texts inhtml/Locals.js.- Config.Notification
- Function for notifications. Replace the body with your own notify export if you use one.
Careful
If the modifier line in your config.lua reads UISecondKeyey, rename it to UISecondKey. With the misspelled name the script ignores your value and always uses SHIFT.
›config.luaComplete file · 108 lines
Config = Config or {}
Config.AntiLag = {
-- Hotkey Configuration
Hotkeys = {
-- UI Controls
UIPrimeKey = "N", -- Key to open/close UI when combined with UISecondKey
UISecondKeyey = 21, -- SHIFT key (21) - Modifier key for UI opening
-- Toggle Antilag Hotkey
ToggleKey = 21, -- SHIFT key (21) - Key for Manual/Toggle antilag activation
},
item = "antilag",
-- Web UI Settings
defaultSettings = {
mode = "automatic", -- manual, automatic, toggle
flameSize = 2.4,
minRPM = 0.75,
maxRPM = 0.86,
antilagActive = true,
gearShiftAntilag = true, -- Antilag beim Gang hochschalten
launchControl = false -- Launch Control System
},
-- Permission Settings - Control what players can change in the UI
permissions = {
allowChangeRPM = true, -- Allow players to change min/max RPM settings
allowLaunchControl = true, -- Allow players to enable/disable launch control
allowGearShiftAntilag = true, -- Allow players to enable/disable gear shift antilag
allowChangeFlameSize = true, -- Allow players to change flame size
},
-- Owner Check Settings
requireOwnerForInstall = false, -- If true, only vehicle owner can install antilag
requireOwnerForUninstall = true, -- If true, only vehicle owner can uninstall antilag
-- Flame Size Limits
flameSizeMin = 0.5, -- Minimum flame size (0.5 is the min size)
flameSizeMax = 4.0, -- Maximum flame size (4.0 is the max size)
-- RPM Limits and Differences
RPMLimitMin = 0.65, -- Minimum RPM limit where antilag can be set
RPMLimitMax = 0.90, -- Maximum RPM limit where antilag can be set
maxRPMDifference = 0.15, -- Maximum difference between min and max RPM
minRPMDifference = 0.05, -- Minimum difference between min and max RPM
}
Config.vehiclesTable = "player_vehicles" -- Only for QBCore, change to your vehicles table name
Config.Language = "en"
Config.Locals = {
["de"] = {
installProgress = "Installation des Antilag-Systems",
deinstallProgress = "Deinstallation des Antilag-Systems",
installtionAntilag = "Sie haben das Antilag-System erfolgreich installiert",
deinstalltionAntilag = "Sie haben das Antilag-System erfolgreich entfernt",
alrInstalled = "Ein Antilag-System ist bereits in diesem Fahrzeug installiert",
notInstalled = "Ein Antilag-System ist nicht in diesem Fahrzeug installiert",
inVehicle = "Sie müssen in einem Fahrzeug sein, um das Antilag-System zu installieren",
notOwner = "Sie sind nicht der Besitzer dieses Fahrzeugs",
mustBeDriver = "Sie müssen der Fahrer des Fahrzeugs sein",
antilagOn = "Antilag aktiviert",
antilagOff = "Antilag deaktiviert",
},
["en"] = {
installProgress = "Installation of Antilag system",
deinstallProgress = "Deinstallation of Antilag system",
installtionAntilag = "You have successfully installed the Antilag System",
deinstalltionAntilag = "You have successfully removed the Antilag System",
alrInstalled = "An anti-lag system is already installed in this vehicle",
notInstalled = "An anti-lag system is not installed in this vehicle",
inVehicle = "You must be in a vehicle to install the antilag system",
notOwner = "You are not the owner of this vehicle",
mustBeDriver = "You must be the driver of the vehicle",
antilagOn = "Antilag activated",
antilagOff = "Antilag deactivated",
}
}
function GetLocal(key)
local lang = Config.Language or "de"
if Config.Locals[lang] and Config.Locals[lang][key] then
return Config.Locals[lang][key]
elseif Config.Locals["en"] and Config.Locals["en"][key] then
return Config.Locals["en"][key]
else
return key
end
end
Config.Notification = function(message, type, source)
if Config.framework == "esx" then
if type == "client" then
ESX.ShowNotification(message)
else
TriggerClientEvent("esx:showNotification", source, message)
end
else
if type == "client" then
QBCore.Functions.Notify(message)
else
TriggerClientEvent("QBCore:Notify", source, message)
end
end
end
Good to know
Modified framework? Every framework call of this script sits in client/esx.lua, client/qb.lua, server/esx.lua and server/qb.lua. Adapt those files if your server uses renamed events or a custom inventory. They stay editable in the Locked version too.
05Troubleshooting
Using the item does nothing.
You must be the driver. On QB-Core and with ox_inventory also check that the item exists (see Installation).
“You are not the owner of this vehicle”
The plate is not registered to the player. Set requireOwnerForInstall = false to allow it for every vehicle. On QB-Core check Config.vehiclesTable.
The menu does not open.
Hold SHIFT, then press N. If a player changed the binding, the key from their GTA settings counts, not the one in the config.
Console shows “No supported framework detected”.
The script started before your framework. Move the ensure line below es_extended or qb-core.
06Still stuck?
Open a ticket on our Discord. Send the script name, your framework and version, and the full error from the server console (F8 for client errors). That saves a round of questions.
