# Config

```lua
TZMCFuelTheftConfig = {}

--[[

    ADD HOSE & PETROL CAN

    1.  Navigate to .../[qb]/qb-core/shared/items.lua
    2.  Scroll to the bottom of the item list and paste the following text:

        refillable_petrolcan        = { name = 'refillable_petrolcan', label = 'Reusable Petrol Can', weight = 1000, type = 'item', image = 'weapon_petrolcan.png', unique = true, useable = false, description = 'A reusable petrol can which can be filled up multiple times.' },
        hose                        = { name = 'hose', label = 'Hose', weight = 1000, type = 'item', image = 'hose.png', unique = true, useable = false, description = 'A hose which is used to transfer liquids.' },

    3.  Once added, navigate to .../[qb]/qb-inventory/html/images/ and add your image in. (You can reuse the petrol can image that QBCore provides) You can use the example below:

        https://drive.google.com/file/d/13zeyix1Q_qbh9v0ReHASUQp34sfQvBQT/view?usp=sharing

    4.  You are now done.

    NOTIFICATIONS 

    Feel free to edit the notifications file to accommodate your servers requirements.

]]

-- Required items for stealing and depositing fuel
TZMCFuelTheftConfig.RequiredItems = {
    stealFuel = {
        'hose',
        'refillable_petrolcan'
    },
    depositFuel = {
        'hose',
        'refillable_petrolcan'
    }
}

-- MiniGame settings: enabled and difficulty level
TZMCFuelTheftConfig.MiniGame = {
    enabled = true,               -- Set to true to enable the minigame for fuel theft, false to disable
    difficulty = 'medium'         -- Difficulty levels could be 'easy', 'medium', or 'hard'
}

-- Blacklisted vehicles where fuel theft is disabled
TZMCFuelTheftConfig.BlackListedVehicles = {
    'police',                     -- Add vehicle models here to prevent them from being targeted for fuel theft
    'police2'
}

-- Police response settings
TZMCFuelTheftConfig.Police = {
    enabled = false,              -- If true, police might be called during fuel theft based on probability
    probability = 75              -- The chance (0-100) of police being called when fuel is being stolen
}

-- Explosion settings for different scenarios
TZMCFuelTheftConfig.Explosion = {
    minigameFail = {
        enabled = true,           -- Set to true to enable the explosion when minigame fails
        explosionProbability = 75 -- The chance (0-100) of explosion when the minigame fails
    },
    vehicleEngineOn = {
        enabled = true,           -- Set to true to enable the explosion when the vehicle engine is on
        explosionProbability = 50 -- The chance (0-100) of explosion when the vehicle engine is on
    }
}

-- Vehicle alarm settings during fuel theft
TZMCFuelTheftConfig.VehicleAlarm = {
    enabled = true,               -- Set to true to enable vehicle alarms when fuel theft is attempted
    probability = 100             -- The chance (0-100) of the vehicle alarm going off during fuel theft
}

-- Progress bar settings for stealing and depositing fuel
TZMCFuelTheftConfig.ProgressBar = {
    stealingFuel = {
        label = "Stealing Fuel",
        time = 0.5                -- Time in seconds multiplied by the percentage of fuel in the tank (e.g., 50% fuel * 0.5 = 25 seconds)
    },
    depositingFuel = {
        label = "Depositing Fuel",
        time = 0.5                -- Time in seconds multiplied by the percentage of fuel being deposited
    }
}

-- NPC settings for purchasing tools
TZMCFuelTheftConfig.PurchaseToolsNPC = {
    model = 's_m_m_autoshop_02',  -- NPC model for the tool shop
    x = -350.58,
    y = -45.88,
    z = 54.42,
    h = 344.64                    -- NPC coordinates and heading
}

-- Target settings for interacting with NPCs and vehicles
TZMCFuelTheftConfig.Target = {
    purchaseToolsNPC = {
        icon = "fa-solid fa-basket-shopping",
        text = "Shop"             -- Text for the NPC interaction when buying tools
    },
    stealFuel = {
        icon = 'fas fa-wrench',
        label = 'Steal Fuel'      -- Text for the interaction when stealing fuel
    },
    depositFuel = {
        icon = 'fas fa-wrench',
        label = 'Deposit Fuel'    -- Text for the interaction when depositing fuel
    }
}

-- Menu settings for purchasing tools
TZMCFuelTheftConfig.Menu = {
    type = 'cash',                -- Currency type (e.g., cash)
    currency = '$',               -- Currency symbol
    items = {
        hose = {
            prettyName = "Hose",
            price = 500           -- Price for the hose
        },
        refillable_petrolcan = {
            prettyName = "Empty Petrol Can",
            price = 1000          -- Price for the empty petrol can
        },
    }
}

-- Text messages for various scenarios
TZMCFuelTheftConfig.Text = {
    unableToTransfer = "No fuel can be transferred", -- Message when there is no fuel to transfer, e.g., empty tank or full petrol can
    noMoney = "You can't afford this item"           -- Message when the player cannot afford the item
}
```


---

# 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.tzmc.dev/docs/qb-core/fuel-theft/config.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.
