Skip to content

Trajectcontrole Configuration Reference

This document provides a comprehensive reference for every configuration option in config.lua. All gameplay mechanics, speed unit calibrations, fine billing modes, camera prop models, and matrix synchronization parameters are controlled from this file.


Section Parameter Scope Key Settings
1. Commands & Shortcuts In-game commands and permissions Config.OpenCommand, Config.CreatorCommand, Config.CreatorPermission
2. Storage Configuration JSON file persistence Config.UseJsonStorage
3. Permissions & Accessibility ACE permissions and job checks Config.UseAcePermissions, Config.AllowedJobs
4. Language & UI Settings Language and tablet map defaults Config.Language, Config.UI
5. Speed Configuration Units, multipliers, and offset calibrations Config.SpeedUnit, Config.SpeedMultiplier, Config.SpeedOffset, Config.LegalCorrection
6. Detection Modes Section checks vs. instant gate traps Config.EnableSectionCheck, Config.EnableInstantGateCheck, Config.GateHeadingTolerance
7. Evasion & ANPR Sync Off-road tracking and police dispatch Config.SendToANPR, Config.AlertPoliceOnEvasion, Config.MaxPassageDurationMinutes
8. Matrix Synchronization Dynamic speed rules and buffering Config.SyncWithMatrix, Config.MatrixCalculationMethod, Config.BrakingBufferMeters
9. Camera Props Catalog Streaming distance and 3D prop models Config.EnableCameraProps, Config.CameraStreamingDistance, Config.AvailableCameraProps
10. Visual & Audio Effects Camera flash and shutter audio Config.EnableCameraFlash, Config.EnableSound
11. MTM-PADUI Tablet App registration and branding Config.PadUI
12. Automated Fine Billing Payment modes, CJIB brackets, societies Config.Billing

  • Config.SpeedUnit: Set to "kmh" or "mph".
  • Config.SpeedMultiplier: Standard GTA V native velocity is measured in meters per second (m/s).
    • Use 3.6 for kilometers per hour (km/h).
    • Use 2.236936 for miles per hour (mph).
  • Config.SpeedOffset: Calibration offset (default 0.0). If your server uses custom vehicle handling or speedometer scripts that report slightly higher or lower speeds, adjusting this offset applies symmetrically to both measured speeds and legal limits.
  • Config.LegalCorrection: Statutory deduction (default 3.0 km/h) applied to measured speeds before evaluating violations, matching standard European radar calibration practices.

Config.MatrixCalculationMethod controls how intermediate highway speeds are evaluated:

  • "travel_time" (Recommended / CJIB Standard): Calculates the minimum legal time required to traverse each highway sub-segment safely.
  • "distance_weighted": Direct distance-weighted average speed across all highway segments.
  • "most_lenient": Applies the highest matrix speed encountered along the route.
  • "entry_only": Takes only the speed limit from the entry portal.

Config = {}
-- ============================================================================
-- 1. COMMANDS & SHORTCUTS
-- ============================================================================
-- Client command to open the interactive section control / speed camera map
Config.OpenCommand = "trajectmap"
-- Optional keybind (e.g. "F7" or "" to disable)
Config.OpenKey = ""
-- Admin command to open the in-game creator tool
Config.CreatorCommand = "trajectcreate"
Config.CreatorPermission = "" -- ACE permission (left empty to allow everyone by default)
-- ============================================================================
-- 2. STORAGE CONFIGURATION
-- ============================================================================
-- Dynamic trajectories are stored and persisted in data/trajecten.json
-- Real-time additions and removals via /trajectcreate or the tablet app are saved automatically.
Config.UseJsonStorage = true
-- ============================================================================
-- 3. PERMISSIONS & ACCESSIBILITY
-- ============================================================================
-- Enable ACE Permissions for viewing map
Config.UseAcePermissions = false
Config.AcePermission = "trajectcontrole.open"
-- Job verification (QB-Core / ESX / Qbox / Standalone)
Config.UseJobCheck = false
Config.AllowedJobs = { "*", "police", "sheriff", "state" }
-- ============================================================================
-- 4. LANGUAGE & UI SETTINGS
-- ============================================================================
-- Default language: "en" (English) or "nl" (Dutch)
Config.Language = "en"
Config.UI = {
title = "AVERAGE SPEED CHECK",
defaultZoom = 0.55
}
-- ============================================================================
-- 5. SPEED CONFIGURATION (SPEED UNIT, MULTIPLIER & OFFSET)
-- ============================================================================
-- Measurement unit: "kmh" or "mph"
Config.SpeedUnit = "kmh"
-- Speed multiplier (Conversion from GTA V native m/s to display speed unit):
-- Default GTA V (m/s to km/h): 3.6
-- Default GTA V (m/s to mph): 2.236936
Config.SpeedMultiplier = 3.6
-- Speed offset (Optional calibration adjustment, e.g. 0.0, +1.0, or custom server handling)
-- This offset is applied symmetrically to both measured vehicle speed and effective limit:
-- actualSpeed = (distance / time) * multiplier + offset
-- legalLimit = (distance / minTime) * multiplier + offset
Config.SpeedOffset = 0.0
-- Legal correction margin (e.g. 3.0 deduction for radar calibration / meetcorrectie)
Config.LegalCorrection = 3.0
-- Ignore emergency vehicles with sirens active or vehicle class 18
Config.IgnoreEmergencyVehicles = true
-- ============================================================================
-- 6. DETECTION MODES (INSTANT GATE RADAR vs SECTION AVERAGE)
-- ============================================================================
-- Global default for Section Average Speed Check (average speed calculation between entry and exit)
Config.EnableSectionCheck = true
-- Global default for Instant Gate Speed Camera (instant flash when passing a portal)
Config.EnableInstantGateCheck = true
-- Maximum angle deviation (in degrees) between vehicle heading and gate heading to consider passage valid
Config.GateHeadingTolerance = 115.0
-- Cooldown per vehicle plate (in seconds) between passing the same gate
Config.GateCooldownSeconds = 4
-- Print diagnostic information to server console
Config.Debug = false
-- ============================================================================
-- 7. OFF-ROAD / EVASION HANDLING & ANPR INTEGRATION
-- ============================================================================
-- Purge active passages if vehicle takes longer than X minutes to exit
Config.MaxPassageDurationMinutes = 15
-- Alert police if a speeding vehicle enters a section but leaves off-road before exit
Config.AlertPoliceOnEvasion = true
-- Forward speeding violations directly to MTM-ANPR surveillance network
Config.SendToANPR = true
-- Minimum overspeed (in km/h) above limit to trigger an evasion alert
Config.EvasionSpeedThreshold = 10.0
-- ============================================================================
-- 8. MATRIX SIGNS INTEGRATION (MTM-MATRIXBORDEN & MTM-MATRIXDEV)
-- ============================================================================
-- Global default for real-time matrix sign synchronization
Config.SyncWithMatrix = true
-- Detection radius (in meters) to look for an active matrix sign near gate coordinates
Config.MatrixSearchRadius = 50.0
-- Maximum distance (in meters) to search upstream from an entry gate for an active matrix gantry
Config.MatrixUpstreamLookback = 350.0
-- Corridor calculation method:
-- "travel_time" [Recommended / CJIB Standard]: Sub-segment minimum travel time
-- "distance_weighted": Direct distance-weighted average limit across road segments
-- "most_lenient": Uses the highest matrix speed encountered along the route
-- "entry_only": Takes only the speed limit from the entry portal
Config.MatrixCalculationMethod = "travel_time"
-- Optional transition braking buffer distance (in meters) after a matrix sign drops speed
Config.BrakingBufferMeters = 0.0
-- Display notifications to the driver upon entering, exceeding or completing a section
Config.ShowDriverNotifications = true
-- ============================================================================
-- 9. CAMERA PROPS & STREAMING
-- ============================================================================
-- Enable in-game camera props spawning
Config.EnableCameraProps = true
-- Distance (in meters) within which camera props are rendered
Config.CameraStreamingDistance = 140.0
-- Default camera prop model
Config.DefaultCameraModel = "m24_1_prop_m41_camera_01a"
-- Height offset for standalone camera props if no matrix gantry is linked
Config.DefaultPropHeightOffset = 5.8
-- Available camera props catalog
Config.AvailableCameraProps = {
{
id = "m24_camera_01a",
name = { en = "Modern ANPR Highway Camera", nl = "Moderne ANPR Verkeerscamera" },
model = "m24_1_prop_m41_camera_01a",
defaultZOffset = 0.0,
category = "camera"
},
{
id = "cctv_pole_01a",
name = { en = "Speed Camera Mast", nl = "Flitspaal / Camera Mast" },
model = "prop_cctv_pole_01a",
defaultZOffset = 0.0,
category = "pole"
},
{
id = "cctv_cam_04b",
name = { en = "Heavy Radar Enclosure Camera", nl = "Radarkast Camera (Zwaar)" },
model = "prop_cctv_cam_04b",
defaultZOffset = 0.0,
category = "camera"
},
{
id = "ch_cctv_cam_01a",
name = { en = "Compact Gantry Camera", nl = "Compacte Portaal Camera" },
model = "ch_prop_ch_cctv_cam_01a",
defaultZOffset = 0.0,
category = "camera"
},
{
id = "cctv_cam_02a",
name = { en = "Industrial Traffic Camera", nl = "Industriele Verkeerscamera" },
model = "prop_cctv_cam_02a",
defaultZOffset = 0.0,
category = "camera"
},
{
id = "none",
name = { en = "No Prop (Invisible Laser Detection)", nl = "Geen Prop (Onzichtbare Detectielijn)" },
model = nil,
category = "none"
}
}
-- ============================================================================
-- 10. EFFECTS & AUDIO
-- ============================================================================
-- Visual white screen flash effect upon speeding violation
Config.EnableCameraFlash = true
-- Sound effects for camera flash shutter and gate entry/exit beeps
Config.EnableSound = false
-- ============================================================================
-- 11. MTM-PADUI TABLET INTEGRATION
-- ============================================================================
Config.PadUI = {
enabled = true,
id = "mtm_trajectcontrole",
name = { en = "Average Speed Check", nl = "Trajectcontrole" },
category = "Verkeer & Infrastructuur",
subCategory = "ANPR & Flitsers",
icon = "fa-solid fa-route",
iconBg = "linear-gradient(135deg, #0284c7 0%, #0369a1 100%)",
installed = true
}
-- ============================================================================
-- 12. AUTOMATIC BILLING & SPEEDING FINES ENGINE
-- ============================================================================
Config.Billing = {
enabled = true,
mode = "auto", -- 'auto', 'invoice', or 'direct_bank'
preferredSystem = "auto",
societyAccount = "society_police",
target = "driver", -- 'driver' or 'owner'
minOverspeed = 4,
currencySymbol = "EUR",
calculationMode = "brackets",
-- CJIB Scale Brackets (official Dutch highway fine tiers)
brackets = {
{ min = 1, max = 5, amount = 45 },
{ min = 6, max = 10, amount = 85 },
{ min = 11, max = 15, amount = 160 },
{ min = 16, max = 20, amount = 240 },
{ min = 21, max = 25, amount = 320 },
{ min = 26, max = 30, amount = 410 },
{ min = 31, max = 999, amount = 550, perKmOver30 = 20 }
},
formula = {
base = 50,
perKm = 12.50
},
invoiceDueDays = 7,
label = {
en = "CJIB Traffic Fine (%s)",
nl = "CJIB Verkeersboete (%s)"
},
sendNotification = true
}