The successor to qtarget, focused on improving functionality and performance at the cost of compatibility.
Dependencies
Why another third-eye resource?
The original author of qtarget left FiveM right after releasing it, with many features scrapped or untested. Since it was supposed to be mostly compatible with bt-target it kept many of its flaws, and the resource was mostly abandoned as I worked on other projects. Rather than hacking my way through the spaghetti that makes up qtarget, I started completely fresh with only a list of features.
Video
todo… I’m lazy.
Supported Frameworks
Support for ox_core, esx-legacy.
How can I check if a player has a job/gang?
Use the groups
property to compare against a group, job or gang (framework-dependant).
example
exports.ox_target:addGlobalPlayer({
{
name = 'cuff',
icon = 'fas fa-handcuffs',
label = 'Handcuff',
groups = 'police', -- or {'police', 'sheriff'}, {police = 0}
distance = 1.5,
onSelect = function(data)
cuffPlayer(data.entity)
end
}
})
How can I check for other variables?
Use the canInteract
function with your option.
example
exports.ox_target:addGlobalPlayer({
{
name = 'cuff',
icon = 'fas fa-handcuffs',
label = 'Handcuff',
distance = 1.5,
canInteract = function(entity, distance, coords, name)
return InService and not IsPedCuffed(entity)
end,
onSelect = function(data)
cuffPlayer(data.entity)
end
}
})
Compatibility
As mentioned previously, ox_target has been rewritten entirely purposefully drops compatibility with qtarget. There is partial compatibility included but it does not and will not ever cover 100% of cases.