> For the complete documentation index, see [llms.txt](https://savana.gitbook.io/savanascripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://savana.gitbook.io/savanascripts/scripts/radar-system/config.md).

# Config

{% hint style="info" icon="gears" %} <mark style="color:$info;">Configuration files allow you to manage scripts; use them to add new regions and new products to the marketplace.</mark>
{% endhint %}

{% tabs %}
{% tab title="cfg.lua" %}

```lua
Config = {}

-- Which job names are allowed to use the radar.
Config.AllowedJobs = {
    ['police']  = true,
    ['sheriff'] = true,
    ['bcso']    = true,
    ['lspd']    = true,
}

-- Restrict the HUD to police vehicles only.
--   false = HUD can be opened in any vehicle (via command/key)
--   true  = HUD only opens when seated in a model listed in Config.PoliceVehicles
Config.RequirePoliceVehicle = true
Config.PoliceVehicles = {
    ['police']  = true,
    ['police2'] = true,
    ['police3'] = true,
    ['police4'] = true,
    ['policeb'] = true,
    ['policet'] = true,
    ['sheriff'] = true,
    ['sheriff2'] = true,
    ['fbi']     = true,
    ['fbi2']    = true,
}

-- HUD scanning parameters
Config.ScanInterval     = 250    -- ms — scan tick interval
Config.MaxScanDistance  = 80.0   -- m — maximum antenna range
Config.MaxScanAngle     = 28.0   -- deg — antenna cone half-angle at long range
Config.NearScanAngle    = 60.0   -- deg — wider cone for close targets (catches motorcycles / scooters passing alongside)
Config.NearScanDistance = 18.0   -- m — below this distance NearScanAngle is used
Config.MaxLogs          = 50     -- maximum number of speed log entries kept in memory
Config.MaxBoloPlates    = 50     -- maximum number of BOLO plates allowed in the list
Config.AutoUnlockMs     = 4000   -- ms — a lock (manual or auto) releases itself after this duration

-- Sound settings (uses GTA's native frontend sound system, see PlaySoundFrontend)
--   Detect: single beep when a new vehicle enters the radar cone
--   Lock:   "beep beep beep" sequence when a lock is captured
--           lockBeepCount controls repeats, lockBeepGap is the gap between them in ms
-- Known working sound pairs you can swap in:
--   { 'NAV_UP_DOWN',     'HUD_FRONTEND_DEFAULT_SOUNDSET' }
--   { 'TIMER_STOP',      'HUD_MINI_GAME_SOUNDSET'        }
--   { '5_Second_Timer',  'HUD_MINI_GAME_SOUNDSET'        }
--   { 'PIN_BUTTON',      'ATM_SOUNDS'                    }
--   { 'Beep_Red',        'BIG_SCORE_SCREEN_SOUNDS'       }
Config.Sounds = {
    enabled       = true,
    detectSound   = 'NAV_UP_DOWN',
    detectSet     = 'HUD_FRONTEND_DEFAULT_SOUNDSET',
    lockSound     = 'TIMER_STOP',
    lockSet       = 'HUD_MINI_GAME_SOUNDSET',
    lockBeepCount = 3,
    lockBeepGap   = 140,         -- ms between successive lock beeps
}

-- Default state applied when a player first opens the HUD
Config.Defaults = {
    radarType    = 1,            -- HUD layout: 1, 2 or 3
    fastLimit    = 80,           -- km/h — speeds at or above this threshold are flagged "Fast" and auto-locked
    plateLock    = true,         -- if true the captured plate is also frozen alongside the speed on lock
    frontXmit    = true,         -- front antenna transmitter on by default
    rearXmit     = true,         -- rear antenna transmitter on by default
    frontScanOpp = true,         -- front antenna lane: true = opposing traffic, false = same direction
    rearScanOpp  = false,        -- rear antenna lane: true = opposing traffic, false = same direction
}

-- Chat commands
Config.Commands = {
    toggleHud = 'radar',         -- show / hide the radar HUD
    openMenu  = 'radarmenu',     -- open the settings menu
    editHud   = 'radaredit',     -- toggle edit mode (drag to move HUD, click in-HUD buttons)
}

-- Keybindings registered with RegisterKeyMapping.
-- Players can rebind these from GTA's Settings > Keybindings > FiveM page.
Config.Keybinds = {
    toggleHud = 'F5',
    openMenu  = 'F6',
    editHud   = 'F7',
}

-- Active language code. Translations live in shared/locales.lua and feed both the
-- backend notification text and the React UI. Supported codes (25 languages):
--   en, tr, de, fr, es, it, pt, pt-BR, ru, pl, nl, sv, fi, no, da,
--   cs, hr, hu, ro, el, ar, he, zh, ja, ko
Config.Language = 'en'

-- Resolves the active locale table. Falls back to English when the chosen code is
-- missing or shared/locales.lua failed to load. Used throughout the codebase as Config.Locale.<key>.
Config.Locale = Locales and (Locales[Config.Language] or Locales['en']) or {}
Config = {}

-- Which job names are allowed to use the radar.
Config.AllowedJobs = {
    ['police']  = true,
    ['sheriff'] = true,
    ['bcso']    = true,
    ['lspd']    = true,
}

-- Restrict the HUD to police vehicles only.
--   false = HUD can be opened in any vehicle (via command/key)
--   true  = HUD only opens when seated in a model listed in Config.PoliceVehicles
Config.RequirePoliceVehicle = true
Config.PoliceVehicles = {
    ['police']  = true,
    ['police2'] = true,
    ['police3'] = true,
    ['police4'] = true,
    ['policeb'] = true,
    ['policet'] = true,
    ['sheriff'] = true,
    ['sheriff2'] = true,
    ['fbi']     = true,
    ['fbi2']    = true,
}

-- HUD scanning parameters
Config.ScanInterval     = 250    -- ms — scan tick interval
Config.MaxScanDistance  = 80.0   -- m — maximum antenna range
Config.MaxScanAngle     = 28.0   -- deg — antenna cone half-angle at long range
Config.NearScanAngle    = 60.0   -- deg — wider cone for close targets (catches motorcycles / scooters passing alongside)
Config.NearScanDistance = 18.0   -- m — below this distance NearScanAngle is used
Config.MaxLogs          = 50     -- maximum number of speed log entries kept in memory
Config.MaxBoloPlates    = 50     -- maximum number of BOLO plates allowed in the list
Config.AutoUnlockMs     = 4000   -- ms — a lock (manual or auto) releases itself after this duration

-- Sound settings (uses GTA's native frontend sound system, see PlaySoundFrontend)
--   Detect: single beep when a new vehicle enters the radar cone
--   Lock:   "beep beep beep" sequence when a lock is captured
--           lockBeepCount controls repeats, lockBeepGap is the gap between them in ms
-- Known working sound pairs you can swap in:
--   { 'NAV_UP_DOWN',     'HUD_FRONTEND_DEFAULT_SOUNDSET' }
--   { 'TIMER_STOP',      'HUD_MINI_GAME_SOUNDSET'        }
--   { '5_Second_Timer',  'HUD_MINI_GAME_SOUNDSET'        }
--   { 'PIN_BUTTON',      'ATM_SOUNDS'                    }
--   { 'Beep_Red',        'BIG_SCORE_SCREEN_SOUNDS'       }
Config.Sounds = {
    enabled       = true,
    detectSound   = 'NAV_UP_DOWN',
    detectSet     = 'HUD_FRONTEND_DEFAULT_SOUNDSET',
    lockSound     = 'TIMER_STOP',
    lockSet       = 'HUD_MINI_GAME_SOUNDSET',
    lockBeepCount = 3,
    lockBeepGap   = 140,         -- ms between successive lock beeps
}

-- Default state applied when a player first opens the HUD
Config.Defaults = {
    radarType    = 1,            -- HUD layout: 1, 2 or 3
    fastLimit    = 80,           -- km/h — speeds at or above this threshold are flagged "Fast" and auto-locked
    plateLock    = true,         -- if true the captured plate is also frozen alongside the speed on lock
    frontXmit    = true,         -- front antenna transmitter on by default
    rearXmit     = true,         -- rear antenna transmitter on by default
    frontScanOpp = true,         -- front antenna lane: true = opposing traffic, false = same direction
    rearScanOpp  = false,        -- rear antenna lane: true = opposing traffic, false = same direction
}

-- Chat commands
Config.Commands = {
    toggleHud = 'radar',         -- show / hide the radar HUD
    openMenu  = 'radarmenu',     -- open the settings menu
    editHud   = 'radaredit',     -- toggle edit mode (drag to move HUD, click in-HUD buttons)
}

-- Keybindings registered with RegisterKeyMapping.
-- Players can rebind these from GTA's Settings > Keybindings > FiveM page.
Config.Keybinds = {
    toggleHud = 'F5',
    openMenu  = 'F6',
    editHud   = 'F7',
}

-- Active language code. Translations live in shared/locales.lua and feed both the
-- backend notification text and the React UI. Supported codes (25 languages):
--   en, tr, de, fr, es, it, pt, pt-BR, ru, pl, nl, sv, fi, no, da,
--   cs, hr, hu, ro, el, ar, he, zh, ja, ko
Config.Language = 'en'

-- Resolves the active locale table. Falls back to English when the chosen code is
-- missing or shared/locales.lua failed to load. Used throughout the codebase as Config.Locale.<key>.
Config.Locale = Locales and (Locales[Config.Language] or Locales['en']) or {}

            price = 47,
            desc = 'Fertilize for waterilize seed.'
        },
    },
    sellItems = {
        [1] = {
            label = 'Corn',
            name = 'corn',
            price = 42,
            desc = 'Freshly harvested golden corn directly from the fields.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [2] = {
            label = 'Watermelon',
            name = 'watermelon',
            price = 85,
            desc = 'Large and heavy watermelons with a sweet, juicy center.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [3] = {
            label = 'Melon',
            name = 'melon',
            price = 63,
            desc = 'Sweet honeydew melons perfect for a refreshing snack.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [4] = {
            label = 'Lettuce',
            name = 'lettuce',
            price = 15,
            desc = 'Crisp green lettuce leaves, essential for fresh salads.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [5] = {
            label = 'Pepper',
            name = 'pepper',
            price = 34,
            desc = 'Vibrant and spicy peppers to add heat to any gourmet dish.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [6] = {
            label = 'Sunflower',
            name = 'sunflower',
            price = 28,
            desc = 'Tall sunflowers harvested for their seeds and beauty.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [7] = {
            label = 'Tomato',
            name = 'tomato',
            price = 39,
            desc = 'Red, ripe tomatoes full of flavor and ready for market.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [8] = {
            label = 'Pumpkin',
            name = 'pumpkin',
            price = 92,
            desc = 'Huge orange pumpkins, great for carving or hearty soups.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [9] = {
            label = 'Cucumber',
            name = 'cucumber',
            price = 22,
            desc = 'Crunchy cucumbers with high water content and fresh taste.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [10] = {
            label = 'Carrot',
            name = 'carrot',
            price = 18,
            desc = 'Sweet and crunchy orange carrots grown in rich soil.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [11] = {
            label = 'Eggplant',
            name = 'eggplant',
            price = 54,
            desc = 'Deep purple eggplants with a firm texture for cooking.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        },
        [12] = {
            label = 'Mushroom',
            name = 'mushroom',
            price = 71,
            desc = 'Exotic mushrooms gathered from the damp forest floor.Rhoncus ultrices et faucibus ut sclerisque nibh nunc luctus. Com.'
        }
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://savana.gitbook.io/savanascripts/scripts/radar-system/config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
