Target Zones

  • First you have to disable the Text3D option from _config.lua

config/_config.lua line 13
Text3D = false, -- false if you don't want 3D text, make sure to follow the docs for adding zones.
  • Go to any client file and add your box zone, make sure to send the key index of the dealership you want to open:

client/framework/threads.lua
CreateThread(function()
    exports['qb-target']:AddBoxZone("PDMDealership1", vector3(-40.35, -1094.5, 26.27), 0.45, 0.35, {
        name = "PDMDealership1",
        heading = 294.65,
        debugPoly = true,
        minZ = 27.0,
        maxZ = 29.0,
    }, {
        options = {
            {
                type = "client",
                event = "av_vehicleshop:target",
                icon = "fas fa-sign-in-alt",
                label = "Dealership",
                name = "pdm_dealership" -- This is the key index name from _dealerships.lua
            },
        },
        distance = 2.5
    })
end)

Last updated