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)
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
Argument
Description
identifier
The unique string identifier of the target you want to remove