Configuration
Every option in tRadar's config.lua, with its type and default — access, beam, band, self-test, calibration, the tuning fork, and the plate reader.
Everything lives in config.lua, outside escrow. Edit the file, restart the resource. There is no database, no convar and no in-game admin panel for server settings.
Two more files sit outside escrow with it: server/sv_access.lua, where a framework tLib does not already resolve is taught to answer, and layouts/, which is plain HTML and PNG.
The four most servers change
| Option | Why |
|---|---|
Config.access | Defaults to mode = "everyone". Set a real mode on a live server |
Config.band | ka is every modern frontline gun. x and k are older units, and the doppler audio differs |
Config.plateReaderEnabled | Off by default. Turn it on for ALPR |
Config.maxRange | 150 m. Raise it if the unit feels blind, lower it if it feels psychic |
Full reference
General
| Option | Type | Default | What it does |
|---|---|---|---|
Config.access | table | see config.lua | Who may run /tradar, as one block: mode (everyone, ace, job, item, custom, or a list of them), plus ace, job (a job-name-to-minimum-grade map), item/count and custom. Six frameworks and nine inventories resolve out of the box, as independent choices. |
Config.requireVehicle | boolean | true | Require the player to be in a vehicle. The unit is dash-mounted and reads patrol speed off the car. Checked continuously, not just on deploy: step out and the unit is hidden until you get back in, keeping its power, settings and any lock. |
Config.vehicleClasses | number[] | nil | nil | Restrict to these GetVehicleClass ids on top of the access mode. nil allows any vehicle; { 18 } is emergency only. |
Config.speedUnit | string: mph | kmh | "mph" | The server's starting unit. Players change their own and it is remembered. |
Config.defaultRadarLayout | string | "KBX-2200" | The head a player starts with. A missing name falls back to the first installed radar skin. |
Config.defaultPlateLayout | string | "PRX-400" | The plate-reader skin a player starts with. |
Config.defaultRemoteLayout | string | "RCX-150" | The remote skin a player starts with. |
Config.plateReaderEnabled | boolean | false | Whether the plate reader surface exists at all. Off by default — it is a second window on screen. |
Config.remoteEnabled | boolean | true | Whether the handheld remote exists. It is only drawn in keypad mode. |
Config.dopplerAudio | boolean | false | Whether the continuous speed tone starts on. Off by default; each player has their own Doppler Audio tickbox in /tradar, so this is the starting value and not a lock. Does not affect what a bystander hears — that is audioRange. |
Config.defaultVolume | number, 0–1 | 0.5 | Starting level for the doppler and lock tones, 0.0–1.0. Players change their own. |
Config.maxRange | number | 150.0 | Metres the unit can clock an ordinary car. Also the range it reports to detectors. |
Config.minPlayerRange | number | 50.0 | Floor on the player's own beam-range slider, in metres. maxRange is its ceiling. |
Config.coneAngle | number | 6.0 | Beam HALF-angle in degrees, off the antenna axis. A 12–15° wide antenna is 6–7.5° here. |
Config.rangeFactorMax | number, 1 or more | 2.0 | How far past maxRange the largest vehicle still reads, as a multiple. 1.0 means nothing out-reaches a car. |
Config.targetHoldMs | number | 400 | How long a lost reading stays on the glass before the window blanks. |
Config.band | string: x | k | ka | "ka" | The band on the air — x (10.525 GHz), k (24.150), or ka (34.700). Sets the doppler audio and what detectors hear. |
Config.frequency | number | nil | nil | Exact frequency in GHz, overriding the band default. nil uses the band's own. |
Config.layoutBands | table | see config.lua | Per-faceplate band overrides, so one server can ship a Ka head and a K head. |
Config.instantOnWindowMs | number | 4000 | How long the transmitter may be up and still be reported to a detector as instant-on rather than constant-on. |
Config.minSpeedKmh | number | 8.0 | Below this, the unit shows nothing rather than a number — the doppler shift is down in the clutter. |
Config.maxSpeedKmh | number | 320.0 | Above this, the unit shows nothing rather than a number. |
Config.stationaryMaxSpeed | number | 3.0 | How fast the patrol car may move in stationary mode before the unit stops reading entirely. |
Config.fastThreshold | number | 3.0 | How much quicker than the tracked target a vehicle must be before the FAST window lights, in display units. |
Config.fastLimitMax | number | 200 | Ceiling on the auto-lock limit a player may dial in. 0 removes auto-lock and all four of its controls — the arm and the limit, on Quick and on Unit alike. |
Config.rearAlertMargin | number | 10.0 | How much faster than the patrol car same-lane traffic must be overtaking before the rear alert fires. |
Config.patrolBlankBelow | number | 0.0 | A patrol speed below this is not shown at all. |
Config.selfTestMs | number | 900 | How long one check takes. The first 60% of it drives every window to 888. |
Config.selfTestIntervalMs | number | 900000 | How often a powered unit re-checks itself. 15 minutes by default. |
Config.selfTestFailChance | number, 0–1 | 0.0 | Chance a scheduled check fails, 0.0–1.0. A failure latches: no speeds until a later check passes. |
Config.patrolShadowPull | number, 0–1 | 0.2 | How hard an obstructing lorry drags the ground channel, as a fraction of the closing rate. Ships on; 0 disables it. |
Config.patrolShadowMaxError | number | 10.0 | Ceiling on the error that shadowing can cause, in display units. |
Config.calibrationHighMph | number | 0.0 | Top of the tolerance window a unit draws its fixed offset from at power-up. 0 is an exact instrument. |
Config.calibrationLowMph | number | 0.0 | Bottom of that window. The published tolerance for real equipment is +1/−2 mph. |
Config.sampleMs | number | 100 | How long one reading integrates. A doppler counter counts over a window, it does not sample an instant. |
Config.accuracyMph | number | 1.0 | How far a reading may smear across that window before the unit refuses it rather than printing a number. |
Config.forkHz | number | nil | nil | The fork the operator carries, in Hz. nil issues the one matching this band — the ordinary case. |
Config.forkMph | number | 65.0 | What the issued fork is stamped with. Display only; the reading comes from the frequency. |
Config.forkRingMs | number | 4000 | How long a struck fork rings. |
Config.rfiEnabled | boolean | true | Whether the unit carries an RFI sensor. A conforming radar inhibits the speed display while interference is present, rather than showing a number that may not have come off a car. The transmitter stays up; a locked window and the patrol window both survive. |
Config.rfiRange | number, 0 or more | 60.0 | Metres. How close an interfering source has to be. |
Config.rfiHoldMs | number, 0 or more | 1500 | How long one detection keeps the display inhibited. |
Config.rfiFromRadar | boolean | true | Another radar on the air nearby interferes. The documented case, and the one officers are trained around: two units working the same stretch. |
Config.rfiSameBandOnly | boolean | true | Only a unit on your own band interferes. True is the honest physics — a receiver's passband is tuned to its band, so a Ka head is not inhibited by an X one. |
Config.rfiFromOwnSiren | boolean | false | Your own siren interferes. Real but historic: strobe supplies and high-power two-way transmitters troubled older installs, and a modern conforming head is hardened against the equipment on its own roof. Note that sirens run for most of a pursuit. |
Config.rfiFromNearbySiren | boolean | false | A nearby vehicle's siren interferes. Same reasoning as rfiFromOwnSiren. |
Config.plateRange | number | 30.0 | Metres. Plates are read off a much shorter ray than speeds are. |
Config.boloWebhook | string | "" | Discord webhook for BOLO activity — a plate added, removed, or seen by a reader. Posted as a Components v2 message. Empty disables it; anything that is not a https://discord.com/api/webhooks/... URL is treated as unset and reported at startup. |
Config.integrations | table | see config.lua | Reporting plate reads to the CAD this server runs, as one block: cad.enabled, cad.provider (nil to use whichever supported CAD is running, or one of lacore, sonoran, imperial, wasabi, tkmdt to pin it), cad.npcFilter, cad.queryOnRead, cad.queryOnLock, cad.minIntervalMs, cad.answerTtlMs, cad.timeoutMs and cad.notifyOfficer. Off by default, and it holds no credential — every path is an export into the CAD's own resource. |
Config.screenRange | number, 0 or more | 8.0 | Metres within which another vehicle's counting unit is still drawn on the prop. A READING distance, much shorter than any audio range; the vehicle you are aboard is exempt from it. |
Config.audioRange | number, 1 or more | 32.0 | Metres within which the unit is HEARD by anyone near the car — lock tones, the rear-traffic alert and the doppler, from the direction of the vehicle. Must comfortably exceed screenRange: you should hear a unit well before you are close enough to read it. The falloff is solved from this number, so gain at exactly this distance is −50.5 dB whatever you set it to; tLib caps it at 250. |
Config.vehicleProp | table | see config.lua | The radar prop on the dash: which models are offered, which is the default, and where it sits on each vehicle. Placements saved in-game win over this table. |
Options that mislead
| Option | What to know |
|---|---|
Config.access.mode | A list is an OR: { "ace", "job" } passes if either does. custom is a function taking a player id. Every failure denies — an absent framework, an unset ace, a custom that throws |
Config.coneAngle | A half-angle. Antennas quoted 12–15° wide are 6–7.5° here. Put the width in and the unit reads cars a lane and a half over |
Config.band | Changes the doppler audio as well as what a detector listens for |
Config.calibration* | Both 0, so a unit reads true. Open the window and heads drift at every power-up |
Config.patrolShadowPull | Live by default. The tell is the patrol window sagging below the speedometer. 0 disables it |
Config.rangeFactorMax | Both ways: 2.0 clocks a lorry twice as far out and loses a motorcycle inside the quoted range |
Config.maxRange | Bounded by what the game streams, a few hundred metres. Past that, readings depend on how busy the server is |
Config.fastThreshold, Config.targetHoldMs | Anti-flicker margins. Lower either and a window flickers |
Startup validation
tRadar validates config.lua at boot and prints every problem at once, naming the key, what was expected, what was found, and the fix.
- A deleted key takes its shipped default. Cut the file down to what you changed.
- A misspelled key is a warning naming the key you meant.
- A value out of range is an error, never quietly replaced. The radar refuses to deploy until you fix it.
Settings that are gone
An update leaves your config.lua in place, so a file predating the Config.access block still carries the three flat keys. Nothing reads them.
| Gone | Replaced by | What to edit |
|---|---|---|
Config.accessMode | Config.access.mode | The same word in mode, inside the block |
Config.acePermission | Config.access.ace | Copy the ace name into ace, set mode = "ace" |
Config.jobs = { "police" } | Config.access.job | A name-to-minimum-grade map: job = { police = 0 }. 0 accepts any grade |
Event names
The PascalCase tRadar: spellings are removed in 1.0.0, and a wrong FiveM event name raises nothing. Lowercase the tRadar: in your own resources: tradar:plateRead, tradar:boloAdd, tradar:boloRemove, tradar:boloHit, tradar:boloRequest, tradar:boloList, tradar:trace:write, tradar:trace:close.
Missing tradar:plateRead is the expensive one: your CAD is never asked about plates, so every read shows no flag. The server exports addBoloPlate, removeBoloPlate and getBoloPlates are unchanged.
tradar_diag
Prints versions, the config verdict, the live access mode, the device's tuning, the installed layouts and whether tDetector is running, to the server console. Safe to paste into a support thread.
add_ace group.admin command.tradar_diag allowNext
tRadar
Still stuck? Support can answer it directly.
Was this page helpful?
TIMMYG Studios