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
qb-target/data/bones.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
},
}
An example of what you are looking for
Change it like this.
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
},
}
An example of what it looks like
Now to fix the Push Vehicle issue as well we need to do a few steps. Follow the examples below.
Go to qb-smallresources then open the client folder and find the vehiclepush.lua file find the CreateThread function on line 69 by default
You are looking for this
And you do it like this.
--[[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)]]
Next, we'll add this simple Function & Export into our QB-Target in the Functions() area:
qb-target/client.lua
local function AllowRefuel(state, electric)
if state then
Allowrefuel = true
else
Allowrefuel = false
end
end
Now enable Config.FixTargetFuel in vt-fuel/shared/config.lua and make it so.