> For the complete documentation index, see [llms.txt](https://docs.blazesmods.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blazesmods.com/scripts/ld-blazeshield/general-configuration.md). Agents can also search and read this documentation through its [MCP server](https://docs.blazesmods.com/~gitbook/mcp).

# General Configuration

All settings are in `config.lua`.

***

### **1. Framework & Inventory**

```lua
Config.Framework = 'auto' -- 'auto', 'qbox', 'qbcore', 'esx' or 'standalone'
Config.Inventory = 'auto' -- 'auto', 'ox' (ox_inventory), 'qb' (qb-inventory / QBCore items), 'esx' (ESX default inventory) or 'none'
```

`auto` detects what is running on the server.

***

### **2. Command**

```lua
Config.Command = 'auto'
```

* **'auto'**: `/shield` works only when no inventory is used (standalone).
* **true**: `/shield` always works, even with items.
* **false**: `/shield` never raises a shield.

With a shield up, `/shield` always lowers it.

***

### **3. Shields**

```lua
Config.Shields = {
    [1] = { label = "SASP",    names = { "SASP", "STATE" },         models = { [1] = "ld_blaze_shield_1", [2] = "ld_blaze_shield_cover_1" }, items = { [1] = "shield_sasp",    [2] = "shield_sasp_cover" } },
    [2] = { label = "Police",  names = { "POLICE", "PD", "LSPD" },  models = { [1] = "ld_blaze_shield_2", [2] = "ld_blaze_shield_cover_2" }, items = { [1] = "shield_police",  [2] = "shield_police_cover" } },
    [3] = { label = "Sheriff", names = { "SHERIFF", "SO", "BCSO" }, models = { [1] = "ld_blaze_shield_3", [2] = "ld_blaze_shield_cover_3" }, items = { [1] = "shield_sheriff", [2] = "shield_sheriff_cover" } },
    [4] = { label = "FBI",     names = { "FBI", "FIB" },            models = { [1] = "ld_blaze_shield_4", [2] = "ld_blaze_shield_cover_4" }, items = { [1] = "shield_fbi",     [2] = "shield_fbi_cover" } },
}
```

* **label**: the agency name shown in the command help.
* **names**: what players can type in `/shield` instead of the number. Not case sensitive.
* **models**: `[1]` = no cover, `[2]` = with cover.
* **items**: the inventory item for each model. Using the item raises or lowers that shield.

***

### **4. Weapons**

```lua
Config.Weapon = { "WEAPON_PISTOL", "WEAPON_COMBATPISTOL", "WEAPON_CARBINERIFLE", "WEAPON_CARBINERIFLE_MK2" }
```

Spawn names, in order of preference. The weapon in hand is used if it's on the list.

* **With ox\_inventory:** the player must have one of these in their inventory. It is equipped automatically.
* **Without ox\_inventory:** the first one the player owns is used. If they own none, the first in the list is given and taken back when the shield comes down.

***

### **5. Messages**

```lua
Config.Locale = {
    use_item = "Use a shield from your inventory.",
    no_weapon = "You need a pistol or rifle that works with the shield.",
    cannot_now = "You can't use the shield right now.",
    bad_type = "Invalid shield type. Use 1 (no cover) or 2 (cover).",
}
```

Notifications use ox\_lib when it's running, otherwise Qbox, QBCore or ESX, otherwise the GTA feed.

***

### **6. Shield Light**

```lua
Config.Light = {
    enabled = true,
    debug = false, -- red line along the beam, green dot at its origin, F8 prints
    ...
}
```

***

### **7. Lamp Position**

In metres relative to the shield. The default is already aligned to the light mount on all eight supplied shields.

```lua
defaultModel = {
    pos = { x = -0.172, y = 0.066, z = 0.120 }, -- X sideways, Y out of the face, Z up
    rot = { x = 0.0, y = 0.0, z = 0.0 },        -- base alignment in degrees
    angle = {
        down = 0.0,  -- degrees below the base aim (negative = up)
        right = 0.0, -- degrees toward the holder's right (negative = left)
    },
},
-- Per model overrides
models = {},
```

Every shield uses `defaultModel` unless it has its own entry in `models`:

```lua
models = {
    ['ld_blaze_shield_cover_4'] = {
        pos = { x = -0.172, y = 0.066, z = 0.120 },
        rot = { x = 0.0, y = 0.0, z = 0.0 },
        angle = { down = 5.0, right = 0.0 },
    },
},
```

***

### **8. Toggle**

```lua
toggle = {
    command = 'shieldlight', -- '' disables the command
    keybind = {
        enabled = true,
        mapper = 'MOUSE_BUTTON',
        key = 'MOUSE_MIDDLE',
        description = 'Toggle shield light',
    },
},
```

For a mouse button use `mapper = 'MOUSE_BUTTON'`. For a keyboard key use `mapper = 'keyboard'`. See the [FiveM key reference](https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/).

***

### **9. Beam Adjust**

```lua
adjust = {
    enabled = true,
    keybind = {
        enabled = true,
        mapper = 'keyboard',
        key = 'E',
        description = 'Adjust shield light beam (hold + scroll)',
    },
    invert = false, -- true = scroll up narrows instead of widens
},
```

***

### **10. Strobe**

```lua
strobe = {
    enabled = true,
    command = 'shieldstrobe', -- '' disables the command
    keybind = {
        enabled = true,
        mapper = 'keyboard',
        key = 'Q',
        description = 'Toggle shield light strobe',
    },
    onMs = 50,  -- flash length in ms
    offMs = 60, -- dark gap between flashes in ms
},
```

***

### **11. Beam**

```lua
light = {
    brightness = 6.0,
    distance = 25.0,                        -- reach in metres
    radius = 10.0,                          -- width
    color = { r = 255, g = 244, b = 214 },  -- 255 / 255 / 255 = pure white
    shadow = true,                          -- false saves performance
    clearance = 0.05,                       -- start the beam in front of the lens
    tuning = {
        steps = 10,                         -- notches from narrowest to widest
        stepFactor = 0.15,                  -- cone change per notch
        radiusRange = { 0.35, 2.5 },        -- narrowest / widest, x radius
        brightnessRange = { 0.5, 1.8 },     -- dimmest / brightest, x brightness
        distanceRange = { 0.6, 1.8 },       -- shortest / longest, x distance
        brightnessExp = 1.0,                -- how much narrowing brightens
        distanceExp = 0.5,                  -- how much narrowing lengthens the reach
    },
},
```

***

### **12. Lens Glow**

```lua
corona = {
    enabled = true,
    firstPerson = false, -- keep false to avoid a glow in your own first-person view
    maxRemote = 16,      -- most glows drawn on other players, -1 = unlimited
},
```

***

### **13. Sync**

```lua
net = {
    maxDistance = 150.0,   -- draw other players' lights within this distance
    shadowDistance = 60.0, -- beyond this, their beams have no shadows
},
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.blazesmods.com/scripts/ld-blazeshield/general-configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
