# Configuration

## ESX Version

Select the ESX version you are using on your server.

```lua
Config.NewESX = true
```

## Discord Webhook

Enable and set your discord webhook.

```lua
Config.WebHook = {
    enable = true,
    link = ''
}
```

## Global configuration

Chose how long the tracker of stolen car last.

```lua
Config.TimerTracker = 5 -- in minutes
```

Blip sound and marker interval when tracker is on.

```lua
Config.BlipInterval = 5 -- in secondes
```

Blip sound when tracker is on.

```lua
Config.BlipSoundPlayer = true
Config.BlipSoundCop = false
```

Global time between 2 car heist.

```lua
Config.TimeBetweenHeist = 30 -- in minutes
```

Enable help tracker for mission level 2 to find the spawned vehicle.

```lua
Config.HelpTracker = true -- Help Tracker for find vehicle. Only for 'customveh' type
```

Percent of chance the ped is armed for mission level 2.

```lua
Config.ChancePedArmed = 50 -- Percent of chance the ped is armed. Only for 'customveh' type
```

## TD GangPlus

Enable if you use the TD GangPlus resource

```lua
Config.TDGangplus = { 
    enable = false, -- true is you use TD GangPlus
}
```

## Start Mission NPC

Chose ped model and coords for the starting mission NPC.

```lua
Config.NPC = {
    start = {
        model = "ig_fbisuit_01", -- https://docs.fivem.net/docs/game-references/ped-models/
        coords = vector4(-1362.0242919922,-756.10266113281,21.305000305176,289.09442138672),
        label = 'Commencer un braquage de véhicule',
    },
}
```

## Missions

Set label, description, exp needed to start mission, exp won when finish this mission, list of vehicle to find, rewards and spawnpoints.

```lua
Config.Missions = {
    [1] = {
        label = "Braquage de niveau 1",
        desc = "Trouve n'importe quel véhicule correspondant en ville !",
        minexp = 0, -- Xp needed to unlock
        expreward = 10,
        gangplusreput = 10, -- ignore if you don't use TD GangPlus
        type = 'publicveh', -- don't touch
        vehicules = {
            {
                model = 'sultan', -- https://docs.fivem.net/docs/game-references/vehicle-references/vehicle-models/
                reward = {
                    {
                        item = 'black_money',
                        min = '100',
                        max = '500',
                    },
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                }
            },
            {
                model = 'panto',
                reward = {
                    {
                        item = 'black_money',
                        min = '100',
                        max = '500',
                    },
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                }
            },
        }
    },
    [2] = {
        label = "Braquage de niveau 2",
        desc = "Trouve un véhicule spécifique avec une plaque spécifique en ville !",
        minexp = 100, -- Xp needed to unlock
        expreward = 20,
        gangplusreput = 20, -- ignore if you don't use TD GangPlus
        type = 'customveh', -- don't touch
        vehicules = {
            {
                model = 'sultanrs', -- https://docs.fivem.net/docs/game-references/vehicle-references/vehicle-models/
                modelcolor = {255,0,0}, -- Red Green Blue
                modelcolorlabel = 'Rouge',
                modelplate = 'TM1654WP', -- 8 Characters max
                reward = {
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                }
            },
            {
                model = 'drafter',
                modelcolor = {0,255,0}, -- Red Green Blue
                modelcolorlabel = 'Verte',
                modelplate = 'TM7965ZX',
                reward = {
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                }
            },
            {
                model = 'issi7',
                modelcolor = {0,0,255}, -- Red Green Blue
                modelcolorlabel = 'Bleue',
                modelplate = 'TM1476KF',
                reward = {
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                }
            },
        },
        spawnpoint = {
            vector4(-572.78076171875,-446.54556274414,34.143032073975,88.885269165039),
            vector4(-754.53326416016,-1323.3521728516,5.0003824234009,50.067802429199),
            vector4(-306.81756591797,230.91709899902,88.009475708008,287.03610229492),
        }
    },
    [3] = {
        label = "Braquage de niveau 3",
        desc = "Braque une livraison de véhicule de luxe !",
        minexp = 200, -- Xp needed to unlock
        expreward = 50,
        gangplusreput = 30, -- ignore if you don't use TD GangPlus
        type = 'containerveh', -- don't touch
        needitem = 'lockpick', -- itemname or false | Item or not for open container
        vehicules = {
            {
                model = 'entity2', -- https://docs.fivem.net/docs/game-references/vehicle-references/vehicle-models/
                modelplate = 'TM1654ZX',
                reward = {
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                }
            },
            {
                model = 'nero2',
                modelplate = 'TM2698JL',
                reward = {
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                }
            },
            {
                model = 'ignus',
                modelplate = 'TM1569QM',
                reward = {
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                    {
                        item = 'money',
                        min = '100',
                        max = '500',
                    },
                }
            },
        },
        spawnpoint = {
            vector4(-409.42483520508,-2469.8044433594,6.000789642334,228.54347229004),
            vector4(-753.6015625,-1485.4060058594,5.0005216598511,328.60882568359),
            vector4(-2154.6176757812,-408.25616455078,13.377019882202,48.293670654297),
        }
    },
}
```

## Endpoint Delivery

Set your own endpoint zones.

```lua
Config.EndPoint = {
    {
        pedmodel = 'ig_fbisuit_01', -- https://docs.fivem.net/docs/game-references/ped-models/
        ped = vector4(2807.8430175781,-731.6982421875,4.2675623893738,319.68966674805),
        zone = vector3(2809.9267578125,-727.78796386719,3.3828186988831),
    },
    {
        pedmodel = 'ig_fbisuit_01', -- https://docs.fivem.net/docs/game-references/ped-models/
        ped = vector4(146.79483032227,-3112.7807617188,5.8963079452515,26.593519210815),
        zone = vector3(143.4587097168,-3108.3469238281,5.2892818450928),
    },
    {
        pedmodel = 'ig_fbisuit_01', -- https://docs.fivem.net/docs/game-references/ped-models/
        ped = vector4(-1163.8392333984,-2021.5950927734,12.180251121521,307.15267944336),
        zone = vector3(-1161.5313720703,-2017.0583496094,13.180250167847),
    },
}
```

## Guards for mission 3

Set ped model, amount, weapon, armor and accuracy for the guards on the level 3 mission.

```lua
Config.Guards = { -- Only for 'containerveh' type
    models = {
        "s_m_m_highsec_02",
        "ig_fbisuit_01"
    },
    amount = 3,
    spawn_range = 15.0, -- don't touch
    weapons = {
        "WEAPON_PISTOL",
    },
    armour = 0,
    accuracy = 40
}
```

## Police Dispatch

Set your own dispatch service or let empty. CD Dispatch for example.

```lua
function Dispatch(title, message)
    local data = exports['cd_dispatch']:GetPlayerInfo()
    TriggerServerEvent('cd_dispatch:AddNotification', {
        job_table = Config.CopsJob, 
        coords = data.coords,
        title = title,
        message = message .. " à " ..data.street, 
        flash = 0,
        unique_id = data.unique_id,
        sound = 1,
        blip = {
            sprite = 431, 
            scale = 1.2, 
            colour = 3,
            flashes = false, 
            text = title,
            time = 5,
            radius = 0,
        }
    })
end
```

## Police Jobs

Set your own police jobs. And amount of cop needed to start mission.

```lua
Config.Cops = 1
Config.CopsJob = {
    'police',
    'bcso'
}
```

## NUI Vehicle Images

If you currently have a script with all cars image so you can change the link.

```lua
Config.NUIVehicleImg = "https://docs.fivem.net/vehicles/"
```

## Notification

Set your own notification system. Ox Lib for example.

```lua
function Notify(title, message, type, duration)
    lib.notify({
        title = title,
        description = message,
        type = type,
        duration = duration,
    })
end
```

## Locales

Set your own text for notifications and labels.

```lua
Config.Locales = {
    nocops = "Come back later!",
    carfind1 = "Find a ",
    carfind2 = " and bring it to the location marked on your GPS!",
    withplate = " with the license plate ",
    titlenotif = "Vehicle Theft",
    notiftracking1 = "Wait ",
    notiftracking2 = " min for the tracker to be disabled before delivering the vehicle!",
    notifendtracking = "Deliver the vehicle if you're no longer being chased by the cops!",
    notifexp = "Exp +",
    notifcontainerstart = "Go to the point marked on your GPS to retrieve the crate! Be careful, it's guarded.",
    notifisplayerveh = "Damn, the vehicle is tracked! Go find another one!",
    notifwrongveh = "That's not the right vehicle!",
    notiffinishmission = "Nice! Here's your reward.",
    notifwrongcar1 = "You were asked for a ",
    notifwrongcar = ", damn it!",
    containertarget = "Open the container",
    progressbarcontainer = "Opening the container",
    drawtext = "Deliver the vehicle",
    alreadyonuse = "Come back later, someone else is already on the job!",
    dispatchtitle = "10-37 - Vehicle Theft",
    dispatchtitleluxe = "10-37 - Luxury Vehicle Theft",
    dispatchinfo1 = "Stolen ",
    dispatchinfo2 = " with license plate ",
    webhookmissionstart = "Mission started",
}
```


---

# 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://tonnydev.gitbook.io/tonnydev-scripts/td-scripts/td-carheistlvl/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.
