AddCircleZone - LiamDormon/bt-target GitHub Wiki

Description

Creates a CircleZone using PolyZone which can be interacted with.

Format

AddCircleZone(name: string, center: vector3, radius: float, options: table, parameters: table)

options = {
    name: string -- Name of BoxZone
    debugPoly: boolean -- Toggle debug drawing for CircleZone
}

parameters= {
    options: table {event: string, icon: string, label: string, job:string[]}
    distance: int -- distance between player and the model
}

Code Example

Citizen.CreateThread(function()
    AddCircleZone("PoliceDuty", vector3(441.79, -982.07, 30.69), 1.4, {
	name="PoliceDuty",
	debugPoly=false,
    }, {
        options = {
            {
                event = "signon",
                icon = "far fa-clipboard",
                label = "Sign On",
                job = {"police", "ambulance", "mechanic"}
            },
            {
                event = "signoff",
                icon = "far fa-clipboard",
                label = "Sign Off",
                job = {"police", "ambulance", "mechanic"},
            },
        },
        distance = 1.5
    })
end)