[Free] Ox Target

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

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.

36 Likes

:ox: :ox: :ox: :ox:

4 Likes

Love it but sadly most scripts are made with qTarget and are not compatible maybe add that Scripts that use qTarget rewritten by ox_Target so that it can be used with ox_Target or an feature that ox_Target understands script that uses qTarget and can use it as it was written to use ox_target instead of qTarget

But thank you guys from overextended for the hard work you put in your Scripts and OX-Framework <3

1 Like

Saw this on your github a while ago and was waiting for an official release - as always, great job.
One thing I’ve wanted but have lacked the ability to do so myself (I have absolutely no idea about how raycasts work, the minimal experience I have with them comes from Unity from at least 5-6 years ago…) is to have it work in a slightly different way - rather than having the eye in the middle and moving your camera around, have the screen freeze and move the eye/a circle around. Whenever you hover over something that has an action - give it an outline and change the color of the eye as to signalize that you can take some action here. I have seen it on some servers and it worked beautifully - if you do have the time, that’s a suggestion/request I’d make.

I’d also bump the previous comment - backwards compatibility with qTarget would be good to be provided. Most actually well-written scripts (which is… not many) will give players the option to configure that to your target system, but most scripts overall - won’t.

1 Like

ox_Target understands script that uses qTarget and can use it

backwards compatibility with qTarget would be good to be provided

I can’t make it backwards compatible. Features don’t exist or are implemented in completely different ways. Some qtarget resources will constantly re-register options on a target, which works because options are stored by name; on ox_target that results in hundreds of options.

Partial compatibility is already there if you look, but it is not and will not ever be a drop-in replacement.

Great work! Looking forward to converting from qtarget and checking out some of the new features. Keep up the great work!

how about qb-target?

Couldn’t care less about qbus and its ecosystem, if people want to PR they can; I’m not wasting my time.

qbtarget is a fork from qtarget and is already mostly compatible with it, but with extra bloat i.e. integrated ped spawning, which makes no sense and will never be accepted.

2 Likes

esx1.1 esx1.2 Can it be used??

finally. thank you

Nobody supports 1.1 anymore

Use ESX 0.1.1. It’s a lot better

Thank you for providing such an amazing tool.
Soon i will change qt_target and go for ox_target instead!

Thanks and keep going!

Probably works, there’s barely anything framework-dependant. I really don’t recommend using such outdated versions though.

hi, im kinda new to ox_target/qtarget so i wanted to ask… if i can (and how) add police menu into this
Example :
identity card
body search
handcuff
hardcuff
uncuff
drag
put in vehicle / out the vehicle

Thanks for response :slight_smile: