> For the complete documentation index, see [llms.txt](https://vt-developmets.gitbook.io/vt-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vt-developmets.gitbook.io/vt-scripts/our-scripts/our-paid-scripts-qb/fuel/fix-target.md).

# Fix Target

There is a **possible** issue with *qb-target* if you are using the *Config.GlobalVehicleOptions* or *Config.TargetBones* options.

#### **If you are NOT having this issue occur, do not follow the instructions below, as it could mess up other things.**

*Here is a simple fix for that issue:*

*You'll need to change what you're having a problem with with the things I'll explain below. Find it*

*<mark style="color:red;">qb-target/data/bones.lua</mark>*&#x20;

```lua
    Bones.Options['boot'] = {
        ["Toggle Trunk"] = {
            icon = "fas fa-truck-ramp-box",
            label = "Toggle Trunk",
            action = function(entity)
                ToggleDoor(entity, BackEngineVehicles[GetEntityModel(entity)] and 4 or 5)
            end,
            distance = 0.9
        },
    }
```

*<mark style="color:orange;">**An example of what you are looking for**</mark>*

<figure><img src="https://i.imgur.com/RPr9oQt.png" alt=""><figcaption></figcaption></figure>

*<mark style="color:red;">Change it like this.</mark>*

```lua
    Bones.Options['boot'] = {
        ["Toggle Trunk"] = {
            icon = "fas fa-truck-ramp-box",
            label = "Toggle Trunk",
            action = function(entity)
                ToggleDoor(entity, BackEngineVehicles[GetEntityModel(entity)] and 4 or 5)
            end,
            distance = 0.9
        },
        ["Push Vehicle"] = {
            icon = "fas fa-wrench",
            label = "Push Vehicle",
            action = function(entity)
                TriggerEvent('vehiclepush:client:push', entity)
            end,
            distance = 0.9
        },
        ["Refuel Vehicle"] = {
            type = "client",
            event = "vt-fuel:client:SendMenuToServer",
            icon = "fas fa-gas-pump",
            label = "Refuel Vehicle",
            canInteract = function() return Allowrefuel end,
            distance = 0.9
        },
    }
```

*<mark style="color:orange;">**An example of what it looks like**</mark>*

<figure><img src="https://i.imgur.com/lXQTSzU.png" alt=""><figcaption><p><em><mark style="color:green;"><strong>This is the example where we have a complaint, namely the trunks and the pushing of the car. If you have another problem just add Refuel Vehicle to your problem.</strong></mark></em></p></figcaption></figure>

*<mark style="color:red;">**Now to fix the Push Vehicle issue as well we need to do a few steps. Follow the examples below.**</mark>*

*Go to <mark style="color:orange;">**qb-smallresources**</mark> then open the <mark style="color:orange;">**client**</mark> folder and find the <mark style="color:orange;">**vehiclepush.lua**</mark> file find the <mark style="color:orange;">**CreateThread**</mark> function on line 69 by default*

***You are looking for this***

<figure><img src="https://i.imgur.com/9H6beRl.png" alt=""><figcaption></figcaption></figure>

***And you do it like this.***

```lua
--[[CreateThread(function()
    exports['qb-target']:AddTargetBone(bones, {
        options = {
            ["Push Vehicle"] = {
                icon = "fas fa-wrench",
                label = "Push Vehicle",
                action = function(entity)
                    TriggerEvent('vehiclepush:client:push', entity)
                end,
                distance = 1.3
            }
        }
    })
end)]]
```

<figure><img src="https://i.imgur.com/owkcmih.png" alt=""><figcaption><p><em><mark style="color:green;"><strong>Save and return to qb-target again to continue troubleshooting.</strong></mark></em></p></figcaption></figure>

*<mark style="color:red;">**Next, we'll add this simple Function & Export into our QB-Target in the Functions() area:**</mark>*\
*<mark style="color:red;">**qb-target/client.lua**</mark>*

```lua
local function AllowRefuel(state, electric)
    if state then
        Allowrefuel = true
    else
	Allowrefuel = false
    end
end
```

<figure><img src="https://i.imgur.com/dwdoF1N.png" alt=""><figcaption></figcaption></figure>

*Now enable **Config.FixTargetFuel** in **vt-fuel/shared/config.lua** and make it so.*

<figure><img src="https://i.imgur.com/ny9Swrs.png" alt=""><figcaption></figcaption></figure>
