# Config Settings

## ⚙️ Configuration Overview

`config.lua` is the main configuration file for **FRKN-Racing v2**.\
All gameplay rules, rewards, systems, NPCs, and interaction settings are controlled from this file.

***

### 🌍 General Settings

```lua
language = 'en', -- tr , en , de
MoneyType = 'cash',
VehicleTableName = 'player_vehicles',
FlagProp = "tr_prop_tr_flag_01a",
```

* **language**: Sets the system language
* **MoneyType**: Currency used for race fees and rewards
* **VehicleTableName**: Database table where player vehicles are stored
* **FlagProp**: Flag prop used in race visuals

***

### 🖥️ HUD Control

```lua
HudOpen = function()
    -- exports['esx_hud']:HudToggle(true)
end,

HudClose = function()
    -- exports['esx_hud']:HudToggle(false)
end,
```

* Used to control your server HUD when the racing menu opens or closes
* Add your own HUD exports here

***

### 🎒 Item System

```lua
Item = {
    config = false,
    ["racechip"] = "racechip",
    ["trackchip"] = "trackchip",
},
```

* Set **config = true** to enable item-based access
* Controls required items for joining races and creating tracks

***

### 👥 Crew System

```lua
CrewSystem = {
    Money = 3000,
    RewardControlTime = 10,
},
```

* **Money**: Cost to create a crew
* **RewardControlTime**: Cooldown (in minutes) before managing crew rewards again

***

### 🧭 Race Line System

```lua
RaceLineSettings = {
    enabled = true,
    formulaOnly = true,
    arrowDistance = 5.0,
},
```

* **enabled**: Enables or disables the racing line
* **formulaOnly**: Shows racing line only in Formula races
* **arrowDistance**: Distance between arrows (affects performance)

***

### ⏱️ Auto Race System

```lua
AutoRace = {
    {
        raceId = 26,
        time = "11:10"
    },
    {
        raceId = 5,
        time = "20:52"
    }
},
```

* Automatically starts races at specific server times
* **raceId** must match the race ID in the database

***

### 🏆 XP & Rating

```lua
WinXP = 100,
RatingWin = 40,

Rating = {
    40, 30, 20, 10, 0, -5, -10
},

XP = {
    50, 40, 30, 20, 10, 5, 3
},
```

* **WinXP / RatingWin**: Rewards given to the race winner
* **XP / Rating tables**: Distribution based on finishing position

***

### 🎁 Weekly Reward

```lua
WeeklyReward = {
    type = "car",
    item = {name = "racechip", amount = 10},
    car = "adder",
    money = 10000
},
```

* Weekly reward system
* **type** can be `money`, `item`, or `car`

***

### 🚗 Race Gameplay Settings

```lua
ManuelSystem = true,
RacePrizeType = "car",
EndOfRaceMarker = true,
MinUser = 1,
StartTime = 2,
DisqualifiedTime = 20,
DisqualifiedPlateCheck = false,
```

* Manual gear system
* Race prize type
* Finish marker display
* Minimum players required
* Start freeze duration
* Disqualification rules

***

### 🔊 Sound Settings

```lua
Sound = {
    EnableCheckpointSound = true,
    CheckpointSound = "heartmonbeat",
    CheckpointSoundVolume = 0.5
},
```

* Controls checkpoint sound effects

***

### 🚫 Drift Blacklist

```lua
DriftBlacklist = {
    'adder',
    'bullet',
    'cheetah',
},
```

* Vehicles listed here cannot enter drift mode

***

### 🔔 Notifications

```lua
Notify = {
    ["join"] = "You successfully participated in the race",
    ["disqualified"] = "You are disqualified from the race"
},
```

* Custom in-game notification messages

***

### 🔐 Authorization System

```lua
Auth = {
    config = false,
    authorization = {
        'AZI27977',
    }
},
```

* Restricts script usage to specific authorization codes

***

### 🎯 Target System

```lua
Interaction = {
    Target = 'qb-target'
},
```

* Use `qb-target` if you are using qb-target
* Use `ox_target` if you are using ox\_target

***

### 🧍 Racing NPC

```lua
RacingNPC = {
    enabled = true,
    coords = vector4(2277.72, 7880.67, 423.52, 239.89),
    model = "s_m_y_devinsec_01",
}
```

* NPC used for teleporting or recovering stuck players

***

### 🛠️ Handling Presets

```lua
handlingPresets = {
    ["sport"] = {
        fInitialDriveForce = 0.35,
        fBrakeForce = 1.2
    },
    ["drift"] = {
        fInitialDriveForce = 0.25,
        fSteeringLock = 65.0
    }
},
```

* Defines vehicle handling behavior for different race types

***

### 📌 Notes

* Always restart the server after config changes
* All settings are optional and customizable
* FRKN-Racing v2 is designed to be modular and expandable


---

# 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://docs.0resmon.org/0resmon/frkn-resources/frkn-racing-v2/config-settings.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.
