[Release] [Standalone] Target Tracking

Seems the issue ive seen a lot on this post is with the config, how are we supposed to set this portion up?
This is how I have mine set up, could someone tell me what I am doing wrong here?


Config.ESX = true
-- Return an object in the format
-- {
--     name = job name
-- }
Config.NonEsxJob = function()
    local PlayerJob = 
    {
        police = police
    }
    return PlayerJob
end```

Does anyone know why this triggers

AddBoxZone("ToolShop", vector3(45.2, -1748.2, 28.56), 0.8, 0.8, {
    name="ToolShop",
    heading=49.18,
    debugPoly=false,
    minZ=210.00,
    maxZ=30.37
}, {
   options = {
           {
              event = "ToolShop",
              icon = "fas fa-circle",
              label = "Purchase tools",
           },
   },
   distance = 1.5
})  

But this doesn’t trigger?

AddBoxZone("ToolShop", vector3(2749.3, 3472.3, 54.679393768311), 0.8, 0.8, {
     name="ToolShop",
     heading=250.16,
     debugPoly=true,
     minZ=56.55,
     maxZ=54.50
}, {
    options = {
       {
            event = "ToolShop",
             icon = "fas fa-circle",
             label = "Purchase tools",
       },
   },
   distance = 2.5
})  

It’s the same exact code, but it’s in a different location

for what my opinion worth, at first glance… i would bet its your minZ and maxZ.
Dont know how a minZ of 210.00 and a maxZ of 30.37 would trigger on a vector z of 28.56

for a ped, i usually copy the vector z and do min -0.5 and max +1.0
in your last case, i would invert the min and max… good luck pal

I changed my minZ and maxZ and it still isn’t working. For some reason I can only do it in the city and not in Blaine county

I think it’s because you have the same name on both BoxZone. Try changing the “ToolShop” from the Blaine county one to “ToolShop1”

Like this:

AddBoxZone("ToolShop1", vector3(2749.3, 3472.3, 54.679393768311), 0.8, 0.8, {
     name="ToolShop1",
     heading=250.16,
     debugPoly=true,
     minZ=56.55,
     maxZ=54.50
}, {
    options = {
       {
            event = "ToolShop",
             icon = "fas fa-circle",
             label = "Purchase tools",
       },
   },
   distance = 2.5
})  

I tried that as well, but it didn’t work. I’m thinking it’s a polyzone issue since it only works in the city or it’s a ped AI issue.

This is an example fully working from my server:
Try adapting to yours.

exports['bt-target']:AddBoxZone("FoodBurgerTray1", vector3(-1195.322,-892.3327,13.7), 0.4, 0.5, {

        name="FoodBurgerTray1",

        heading=125.0,

        debugPoly=false,

        minZ=13.500,

        maxZ=14.30

        }, {

        options = {

            {

            event = "gl-burgershot:openTray1",

            icon = "fas fa-box-open",

            label = "Tabuleiro",

            },

        },

        job = {"all"},

        distance = 2.5 

    })

    exports['bt-target']:AddBoxZone("FoodBurgerTray2", vector3(-1194.033,-894.2404,13.7), 0.4, 0.5, {

        name="FoodBurgerTray2",

        heading=125.0,

        debugPoly=false,

        minZ=13.500,

        maxZ=14.30

        }, {

        options = {

            {

            event = "gl-burgershot:openTray2",

            icon = "fas fa-box-open",

            label = "Tabuleiro",

            },

        },

        job = {"all"},

        distance = 2.5 

    })
1 Like

anyone know how you can make it toggleable rather than press and hold?

1 Like

Hi everyone, in case someone else had the issue I was having, it’s not broken it’s just a different way of doing it. If your target doesn’t appear it’s because the PolyZone isn’t touching the floor. To get the true Z coords for your target you need to spawn a prop or vehicle then use Devtools to get its position. I will then put the coords of my target on the top line of the export, but use the Z coord of the object which is touching the floor. Then, in the minZ I will use the same value but decrease the first decimal by one point. I’ll attach some screenshots. Using the screenshot example, change the minZ to 30.43814


I keep getting this error when ever I load the script

Any help would be appreciated
Ty

I see why you would want this but also, you dont need to press and hold, just press left Alt, and boom the third eye stays

Why hit the punches
When pressing on the eye

Hey awesome script. Is there any way to make this work by registering a command. For example I have a banking script using the command /atm when standing close to a atm or in the bank. It would really be a game changer.

were do i add this

Im not sure on why thats happening but how do you have your console like that on the left of your screen

on your client side

very nice!

I also want to know, is there any way to make this work by registering a command. For example I have a banking script using the command /atm when standing close to a atm or in the bank. It would really be a game changer.

how can i change the key to see the eye from left alt to something else?

How do i get this to trigger something like an inventory @Brentn5