# Config Settings

#### <mark style="color:blue;">Framework Settings</mark>

```lua
Config.framework = GetResourceState("es_extended") == "started" and "ESX" or "QBCORE"  ---- 'ESX OR QBCORE'

Config.TargetSystem = GetResourceState("ox_target") == "started" and "ox" or "qb" --- ox , qb or custom
```

The system automatically detects your framework. The Target section automatically detects qb and ox targets. For custom target systems, you can enter ‘custom’. You can configure your custom targets using the SetupTarget function.

#### <mark style="color:blue;">Others Settings</mark>

* **useBucket Setting**

```lua
Config.useBucket = false
```

⚠️ The map is located in the harbour. Therefore, if you are using the harbour, you must open a bucket. (Players cannot see the map and vehicles created by the client, but they can see other players.) Soon, maps will be added to a different location.

* **Debug Mode**

```lua
Config.DebugMode = {
    text = false,
    showpolyzone = false,
    clickpoly = false
}
```

With this setting, you can see the script's feedback and view the click and field creation polzone sections.

* **Draw UI**&#x20;

```lua
Config.DrawUi = 'ox' ---- ox , qb or custom
```

This helptext refers to the text displayed on the left or right. You can customise this within the framework > cl\_wrapper.lua file.

* **Weekly Price Control**

```lua
Config.WeeklyPriceControl = 10  ----- 10 munite
```

This setting determines the weekly leaderboard check interval on the server side.

* **Ambience State**

```lua
Config.AmbiEnce = true
```

Turns off the ambient sounds at the puzzle entrance and then turns them back on

* **Vehicle Select Border**

```lua
Config.vehicleSelectBorderColor = {r = 255, b = 0, g = 0 , alpha = 255}
```

This setting determines the colour of the light that illuminates when the highlight tool is selected.

* **Daily Puzzle Limit**

```lua
Config.DailyPuzzleLimit = {
    enabled = true,        
    maxPuzzlesPerDay = 7  
}
```

This setting determines the daily puzzle limit for weekly games.

* **Point Decline**

```lua
Config.pointDecline = true
```

If you enable this setting, the score awarded for unsolvable puzzles will decrease by the corresponding amount.

#### <mark style="color:blue;">Weekly Settings</mark>

```lua
Config.WeeklySystem = true

Config.WeeklyRewards = {
    rewards = {
        { rank = 1, cash = 50000, item = "trophy_gold" },
        { rank = 2, cash = 30000, item = "trophy_silver" },
        { rank = 3, cash = 15000, item = "trophy_bronze" }
    },
}
```

With these settings, you can enable or disable the weekly leaderboard system and configure monetary rewards and item gifts for the rankings.

#### <mark style="color:blue;">Create Puzzle Vehicles</mark>

```lua
Config.Vehicles = {
    ['sultan'] = {length = 2,targetable = true},
    ['club'] = {length = 2,targetable = false},
    ['zentorno'] = {length = 2,targetable = false},
    ['blista'] = {length = 2,targetable = false},
    ['sheriff2'] = {length = 3,targetable = false},
   
}
```

You can add vehicles that can be added in the puzzle creation section.

#### <mark style="color:blue;">Admin Settings</mark>

```lua
Config.AdminPuzzleCommand = {
    state = true,
    name = "adopuzzle"

}

Config.Admins = {
    'char1:1bf0cb75aed4b1b83abda5c1e679e1bdd6a2bfe6',
}
```

You can specify the admin command here.

\- Additionally, you must enter your <mark style="color:orange;">identifier</mark> from the users table for esx and your <mark style="color:$danger;">citizenid</mark> from the players table for qbcore into Config.Admins.

#### <mark style="color:blue;">Puzzle Locations</mark>

```lua
Config.PuzzleLocations = {
   ['1'] = {
        label = 'Rush Hour Puzzle', -- name
        opentype = 'target', -- 'drawtext' or 'target'
        opensettings = {
            targetsize = 2.0,
            drawtextsize = 2.0,
            targettext = 'Open Puzzle', -- Text for qb-target
            drawtext = 'Rush Hour Puzzle', -- Text for drawtext
            key = 'E' -- Key for drawtext
        },
        blips = {
            sprite = 197, -- Blip icon
            color = 3,   -- Blip color
            scale = 0.8, -- Blip size
            label = "Rush Hour Puzzle",-- Blip label
            coord = vector3(152.901108, -985.674744, 30.088623)
        },
        coord = vector4(152.901108, -985.674744, 30.088623, 206.92),
        ped = {state = true, model = 'a_m_m_mexcntry_01'},
        menu = {
            puzzles = {
                {
                    type = 'middle',
                    label = 'LvL 5 Random',
                    point = 500,
                    level = 5,
                    timer = 200
                },
                {
                    type = 'middle',
                    label = 'LvL 4 Random',
                    point = 100,
                    level = 4,
                    timer = 120
                },

                {
                    type = 'middle',
                    label = 'LvL 3 Random',
                    point = 20,
                    level = 3,
                    timer = 40
                },

                {
                    type = 'middle',
                    label = 'LvL 2 Random',
                    point = 15,
                    level = 2,
                    timer = 30
                },

                {
                    type = 'middle',
                    label = 'LvL 1 Random',
                    point = 5,
                    level = 1,
                    timer = 15
                }

               

            },
            leaderboard = {
                label = 'LeaderBoard'

            }
        }
    
    }
}
```

You can set puzzles at your desired levels from the menu settings.
