Target
These functions are available in the file config/shared.lua
QB-Target
This is the default configuration that comes with the script:
Config.Target = "qb-target"
function target(elements, options)
exports["qb-target"]:AddTargetModel(
elements,
{
options = options,
distance = 3.0
}
)
end
function targetBoxZone(store, options, location)
exports["qb-target"]:AddBoxZone(
"store-" .. tonumber(store),
vector3(location.x, location.y, location.z),
1.7,
1.0,
{
name = "store-" .. tonumber(store),
heading = location.w,
minZ = location.z - 1,
maxZ = location.z + 1
},
{
options = options,
distance = 1.5
}
)
end
function targetPlayer(options)
exports["qb-target"]:AddGlobalPlayer(
{
options = options,
distance = 3.0
}
)
end
function targetNPC(options)
exports["qb-target"]:AddGlobalPed(
{
options = options,
distance = 3.0
}
)
end
function bones(bones, options)
exports["qb-target"]:AddTargetBone(
bones,
{
options = options,
distance = 1
}
)
end
OX-Target
Config.Target = "ox_target"
function target(elements, options)
exports.ox_target:addModel(elements, options)
end
function targetBoxZone(store, options, location)
exports.ox_target:addBoxZone(
{
coords = vector3(location.x, location.y, location.z),
size = vector3(1.7, 1.0, 2.0),
rotation = location.w,
debug = Config.debug,
options = options
}
)
end
function targetPlayer(options)
exports.ox_target:addGlobalPlayer(options)
end
function targetNPC(options)
exports.ox_target:addGlobalPed(options)
end
function bones(bones, options)
exports.ox_target:addGlobalVehicle(options)
end
Last updated