Qtarget - A re-written and optimised "third eye" solution

bruh :roll_eyes:

As mentioned above, this resource only supports ESX LEGACY. If you’re using another resource, it’s on you to make it compatible. This resource uses a bunch of helpful functions that LEGACY has, that previous versions will not have, so you’ll either need to add them to your version of ESX or replace the functions in qtarget with your own functions to replace them, of which we will provide no support for.

2 Likes

I have a problem using some function that uses job example

exports['qtarget']:AddBoxZone("MissionRowDutyClipboard", vector3(441.7989, -982.0529, 30.67834), 0.45, 0.35, {
	name="MissionRowDutyClipboard",
	heading=11.0,
	debugPoly=false,
	minZ=30.77834,
	maxZ=30.87834,
	}, {
		options = {
			{
				event = "qrp_duty:goOnDuty",
				icon = "fas fa-sign-in-alt",
				label = "Sign In",
				job = "police",
			},
			{
				event = "qrp_duty:goOffDuty",
				icon = "fas fa-sign-out-alt",
				label = "Sign Out",
				job = "police",
			},
		},
		distance = 3.5
})

If I set myself as a police and restart the script it works, but if I set myself as a police and don’t restart the script it doesn’t check the PlayerData.job and doesn’t let me access that function, and if I look at an object I don’t have permission from work the eye does not disappear from my screen, there are no errors in F8 or in the server console

I recorded a video for you to see it doesn’t check my new work only when the script restarts

If the video doesn’t work

What version of ESX are you using?

ESX.PlayerData only gets updated if you use ESX Legacy.

Sorry for maybe this dump question but the cordinates (exports) for the zones and options to trigger the even like :
exports[‘qtarget’]:AddBoxZone(“MissionRowDutyClipboard”, vector3(441.7989, -982.0529, 30.67834), 0.45, 0.35, {
name=“MissionRowDutyClipboard”,
heading=11.0,
debugPoly=false,
minZ=30.77834,
maxZ=30.87834,
}, {
options = {
{
event = “qrp_duty:goOnDuty”,
icon = “fas fa-sign-in-alt”,
label = “Sign In”,
job = “police”,
},
{
event = “qrp_duty:goOffDuty”,
icon = “fas fa-sign-out-alt”,
label = “Sign Out”,
job = “police”,
},
},
distance = 3.5
})

i need to write this in to es_extended\imports.lua
or to the script where i want to do the change in ?

Am I missing something, if I make zone bigger, just a little bottom part of it is intractable, whole lot of the top part is not. I have this issue on all target resources…

An update has been released and extra documentation is being worked on. Lot of improvements, many extra features.

I’m looking to use this to allow for vending machines to act as shops via linden, but I’m NOT looking to enable every machine in the city. I know you can use the zone methods like for shops, but is there a way to use the targeted (hold down the key and the little icon appears in the middle of the screen), but limit whether the entity/model has the event based on coords?

Wouldn’t really work. My inventory does serverside distance checks to see if the player is close enough to a shop/stash/whatever, so you need to add a shop at each vending machine.

With the included code by Leah-UK, assuming you set the shop coords to match the entity coords, it should make the boxzone pretty much perfectly (may need to play with the size).

(post deleted by author)