QBcore OX Target Standalone

CR LEAKS

Administrators
Joined
Mar 25, 2022
Messages
1,495
Credits
28,810
Please, Log in or Register to view URLs content!



The successor to
Please, Log in or Register to view URLs content!
, 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, qb-core.

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).


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
}
})
Click to expand...

How can I check for other variables?​

Use the canInteract function with your option.


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
}
})
Click to expand...

Compatibility​

As mentioned previously, ox_target has been rewritten entirely and purposefully drops compatibility with qtarget. There is
Please, Log in or Register to view URLs content!
included but it does not and will not ever cover 100% of cases.
 
Back
Top Bottom