> For the complete documentation index, see [llms.txt](https://nyx-store.gitbook.io/nyx-store-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nyx-store.gitbook.io/nyx-store-docs/resources/nyx-target/client-exports/addzone.md).

# AddZone

## AddZone

This export does the equivalent of AddCircleZone, AddBoxZone, AddPolyZone, AddEntityZone

### Arguments

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>identifier</td><td>The unique string identifier of this target, in-case you want to remove it later</td><td></td></tr><tr><td>type</td><td>The type of zone you want to create ('circle', 'box', 'poly', 'combo', 'entity')</td><td></td></tr><tr><td>zoneOptions</td><td>The options for the PolyZone (see <a data-mention href="/nyx-store-docs/resources/nyx-target/zone-options-formatting.md">Zone Options Formatting</a>)</td><td></td></tr><tr><td>options</td><td>The options for the target (see <a data-mention href="/nyx-store-docs/resources/nyx-target/options-formatting.md">Options Formatting</a>)</td><td></td></tr></tbody></table>

### Usage

```lua
exports['nyx2_target']:AddZone(identifier, type, zoneOptions, options)
```

### Example (Circle Zone)

```lua
exports['nyx2_target']:AddZone('debug_zone_circle', 'circle', {
    name = 'debug_zone_circle',
    center = vector3(-73.65, -816.52, 326.18 - 1.0),
    radius = 1.0,
    debugPoly = true,
    useZ = true,
}, {
    {
        title = 'Debug Circle Zone',
        icon = 'fas fa-cube',
        action = function(zone)
            local QBCore = exports['qb-core']:GetCoreObject()
            QBCore.Functions.Notify('You are inside a circle zone!', 'success')
        end,
        canInteract = function(zone)
            return true
        end,
        job = nil, -- if nil, all jobs can interact
        gang = nil, -- if nil, all gangs can interact
        citizenid = nil, -- if nil, all players can interact
        item = nil, -- if nil, don't require an item to interact
    }
})
```

### Example (Box Zone)

```lua
exports['nyx2_target']:AddZone('debug_zone_box', 'box', {
    name = 'debug_zone_box',
    center = vector3(-77.63, -820.31, 326.18 - 1.0),
    width = 1.0,
    length = 1.0,
    debugPoly = true,
}, {
    {
        title = 'Debug Box Zone',
        icon = 'fas fa-cube',
        action = function(zone)
            local QBCore = exports['qb-core']:GetCoreObject()
            QBCore.Functions.Notify('You are inside a box zone!', 'success')
        end,
        canInteract = function(zone)
            return true
        end,
        job = nil, -- if nil, all jobs can interact
        gang = nil, -- if nil, all gangs can interact
        citizenid = nil, -- if nil, all players can interact
        item = nil, -- if nil, don't require an item to interact
    }
})
```

## RemoveZone

This export removes a zone target that you have created.

### Arguments

<table><thead><tr><th>Argument</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>identifier</td><td>The unique string identifier of the target you want to remove</td><td></td></tr></tbody></table>

### Example

```lua
exports['nyx2_target']:RemoveZone('debug_zone_box')
```
