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']: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['ox_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
Last updated