Configuration
All options live in config/config.lua.
Options
| Option | Type | Default | Notes |
|---|---|---|---|
Debug | boolean | false | Prints limiter activity to the client console. Leave off in production. |
Unit | 'mph'|'kph' | 'mph' | Applies to every limit value in the config, the keybinds and the statebag. |
SpeedTolerance | integer | 15 | Max amount over the target you may be and still engage the limiter. |
CheckInterval | integer (ms) | 2000 | How often the dynamic limit is re-read. Ignored when EnableDynamicLimits is false. |
EnableDynamicLimits | boolean | false | Track the road speed limit. Requires a source — see Dynamic speed limits. |
MinLimit | integer | 5 | Lower bound on every limit, in Config.Unit. Enforced client and server side. |
MaxLimit | integer | 200 | Upper bound on every limit, in Config.Unit. Enforced client and server side. |
RequestCooldown | integer (ms) | 100 | Minimum gap between statebag writes the server accepts from one player. |
Keybinds.Toggle | string | 'Z' | Default key to toggle the limiter. |
Keybinds.IncreaseSpeed | string | 'RIGHT' | Default key to raise the limit by 1. |
Keybinds.DecreaseSpeed | string | 'LEFT' | Default key to lower the limit by 1. |
Default config
---@type Config
Config = Config or {}
Config.Debug = false
Config.Unit = 'mph'
Config.SpeedTolerance = 15
Config.CheckInterval = 2000
Config.EnableDynamicLimits = false
Config.MinLimit = 5
Config.MaxLimit = 200
Config.RequestCooldown = 100
Config.Keybinds = {
Toggle = 'Z',
IncreaseSpeed = 'RIGHT',
DecreaseSpeed = 'LEFT'
}Notes on individual options
Unit
Set this once and everything follows it — MinLimit, MaxLimit, SpeedTolerance, the limit shown to the player, and the value written to the statebag. If your GetSpeedLimit source returns a different unit, that is handled separately: see dynamic limits.
WARNING
Changing Unit does not convert MinLimit, MaxLimit or SpeedTolerance for you. Switching from mph to kph with a MaxLimit of 200 leaves you with a 200 kph cap, not 322. Set them for the unit you are using.
SpeedTolerance
The grace band for engaging. With the default of 15 on mph, a driver doing 78 in a 70 zone can still engage; at 86 the limiter refuses. Lower it for stricter behaviour, raise it if players complain about it not catching.
MinLimit and MaxLimit
Both are enforced on the client and re-checked on the server before the statebag is written, so a modified client cannot push a value outside this range.
RequestCooldown
Rate-limits statebag writes per player. The default of 100ms is comfortably above normal use (one press = one write) while stopping a spammed key or a script from flooding the server. Raise it if you want to be stricter; there is little reason to lower it.
Debug
Prints the target limit, engagement decisions and the RPM cut to the client console. Useful when wiring up a dynamic limit source. Noisy — turn it off before release.