Target
These functions are available in the file config/shared.lua
QB-Target
function entityTarget(entity, event, label)
exports['qb-target']:AddTargetEntity(entity, {
options = {{
type = "client",
event = event,
icon = "fas fa-box-circle-check",
label = label
}},
distance = 3.0
})
end
-- Function to use the target with the office zone to open the UI
function boxZoneTarget()
exports['qb-target']:AddBoxZone("UsedCars", vector3(1224.06, 2733.64, 38.01), 2, 2, {
name = "UsedCars",
heading = 0.0,
debugPoly = false,
minZ = 30.0,
maxZ = 40.0
}, {
options = {{
type = "client",
event = "bit-usedcars:openUI",
icon = "fas fa-sign-in-alt",
label = "Dashboard"
}},
distance = 2.5
})
end
OX-Target
function entityTarget(entity, event, label)
exports.ox_target:addLocalEntity(entity, {
{
type = "client",
event = event,
icon = "fas fa-box-circle-check",
label = label
}
})
end
function boxZoneTarget()
exports.ox_target:addBoxZone({
coords = vec3(-30.56, -1664.53, 28.42),
size = vec3(2, 2, 2),
rotation = 0.0,
debug = false,
options = {
{
type = "client",
event = "bit-usedcars:openUI",
icon = "fas fa-sign-in-alt",
label = "Dashboard",
distance = 2.5
}
}
})
end
Last updated