# Configuration

This document explains every option available in the **Enyo AI Guards** configuration file.\
Use this guide to fully customize the security team system for your FiveM server.

***

### Security Team Rent System

#### Team Renting Logic

```lua
Config.teamRenting = true
```

* **true** → Teams are rented per player and locked until the contract ends.
* **false** → Teams can be reused, transferred, and given multiple times.

***

#### Team Creation Cost

```lua
Config.teamCosts = true
```

* **true** → Creating teams costs money (vehicles, weapons, attributes).
* **false** → Everything is free.

***

### Available Vehicles

```lua
Config.availableVehicles = {
    washington = 2500,
    stretch = 3500,
    baller3 = 6000,
    patriot2 = 9500,
    ...
}
```

Defines which vehicles can be used by security teams and their prices.

#### Categories

* **Standard**: Sedans & SUVs
* **Armored/Tactical**: Military-grade vehicles
* **Bikes**
* **Air Support**: Helicopters

Prices apply only if `Config.teamCosts = true`.

***

### Available Weapons

```lua
Config.availableWeapons = {
    weapon_pistol = 500,
    weapon_smg = 2500,
    weapon_assaultrifle = 5000,
    ...
}
```

Controls which weapons guards can use and their cost.

Weapon tiers include:

* Pistols
* SMGs
* Rifles
* Shotguns
* Sniper rifles

***

### 🧍‍♂️ Guard Ped Models

```lua
Config.availablePeds = {
    "s_m_m_bouncer_01",
    "s_m_m_security_01",
    "s_m_y_blackops_01",
    ...
}
```

List of ped models available for guards.

These determine:

* Appearance
* Role-play immersion
* Visual style (civilian, tactical, elite)

***

### Guard Attribute System

```lua
Config.attributesPrices = {
    shootingSkill = 25,
    drivingSpeed = 10,
    shield = 5
}
```

Attributes increase guard performance and cost.

#### Cost Formula

```
Final Cost = Attribute Value × Attribute Price
```

Example:

* 100 shield × 5 = **$500**

***

### Hotkeys & Commands

#### Keybinds

```lua
Config.openRadial = "PAGEDOWN"
Config.openMenu = "INSERT"
```

| Key      | Action                  |
| -------- | ----------------------- |
| PAGEDOWN | Open radial menu        |
| INSERT   | Open main security menu |

***

#### Player & Admin Commands

| Command               | Description                   |
| --------------------- | ----------------------------- |
| `/security`           | Open main UI                  |
| `/securityradial`     | Open quick radial             |
| `/securitymanagement` | Admin/security job management |

***

#### Exports (Developers)

```lua
exports['enyo-aiguards']:OpenSecurityMenu()
exports['enyo-aiguards']:OpenSecurityRadial()
exports['enyo-aiguards']:OpenSecurityManagement()
```

Radial control exports include:

* Formations
* Attack / follow orders
* Hold position
* Kill zone & business guarding
* Ally management

***

### Permissions & Roles

#### Allowed Jobs

```lua
Config.securityJobs = {'police', 'ammunation', 'gruppesechs'}
```

These jobs can rent, manage, and deploy security teams.

***

#### Admin Groups

```lua
Config.adminGroups = {'command', 'admin', 'god'}
```

These groups get full admin access.

***

#### Police Respect Toggle

```lua
Config.securityRespectPolice = false
```

* **true** → Guards will never attack police.
* **false** → Guards react normally.

***

#### Cooldown Time

```lua
Config.cooldownTime = 35
```

Minimum: **30 seconds**\
Prevents spam calling of security teams.

***

#### Realism Toggles

```lua
Config.sufferHeadshot = false
Config.ragdoll = false
```

| Option   | Effect               |
| -------- | -------------------- |
| Headshot | Instant death        |
| Ragdoll  | Guards fall when hit |

***

#### Driving Styles

```lua
Config.NormalDrivingStyle = 447
Config.CrazyDrivingStyle = 525116
```

Controls AI driving behavior.

***

### &#x20;Formation & Spawn Settings

#### Spawn Distance

```lua
Config.maxSpawnDistance = 150
```

Distance from player where guards can spawn\
Range: **20 – 180**

***

### Weapon Blacklist (No Engagement)

```lua
Config.nonBackupNeededWeapons = {
    "WEAPON_Grenade",
    "WEAPON_Molotov",
    ...
}
```

If a player equips any of these weapons:

* Guards **will not respond**
* Guards **will not engage**

Perfect for RP & non-violent scenarios.

***

#### Debug Mode

```lua
Config.debug = false
```

* **true** → Logs debug messages to server console.

***

#### AI Markers

```lua
Config.markAI = true
```

Toggles floating AI labels\
Command: `/toggleaimark`

***

#### PvP Toggle

```lua
Config.pvp = true
```

* **true** → Normal PvP
* **false** → Everyone is treated as an ally (PvE mode)


---

# Agent Instructions: 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://enyo-scripts.gitbook.io/documentations/fivem-scripts/ai-guards-v2/configuration.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.
