qbcore-framework/qb-target

[BUG] - Multiple options in a box zone

ADRNALN opened this issue · 2 comments

Describe the bug
With the newest update having multiple options in a single box zone no longer work, only the first item in the list works when clicked. I removed the first option below and only had SWAT and the menu opened fine but when patrol armory and swat armory were in the list only the patrol armory opens. I also put swat armory above patrol armory and then only swat armory did anything when selected.

To Reproduce

exports['qb-target']:AddBoxZone("Police-MRPD-Armory", vector3(482.55, -994.90, 30.7), 1.0, 0.3, {
    name="Police-MRPD-Armory",
    heading=91,
    debugPoly=false,
    minZ=29.80,
    maxZ=31.50
    }, {
        options = {
        {
            event = "qb-police:client:PoliceArmory",
            icon = "fas fa-store",
            label = "Open Patrol Armory",
            job = {
                ["lspd"] = 0,
                ["bcso"] = 0,
                ["sasp"] = 0,
            },
        }, {
            event = "qb-police:client:SWATArmory",
            icon = "fas fa-bolt",
            label = "Open S.W.A.T Armory",
            job = {
                ["lspd"] = 0,
                ["bcso"] = 0,
                ["sasp"] = 0,
            },
        },
    },
    distance = 1.5,
})

Update to the latest source code, not the release

Ah, that fixed it. Thanks!!