local boxCoords = vector3(-74.41, -823.88, 326.18)
local boxModel = GetHashKey('prop_boxpile_07d')
RequestModel(boxModel)
while not HasModelLoaded(boxModel) do
Wait(0)
end
local box = CreateObject(boxModel, boxCoords.x, boxCoords.y, boxCoords.z - 1.0, false, false, false)
SetEntityAsMissionEntity(box, true, true)
SetEntityAlpha(box, 255, false)
SetModelAsNoLongerNeeded(boxModel)
exports['nyx2_target']:AddEntity('debug_box_entity', box, {
{
title = 'Debug Box Entity',
icon = 'fas fa-box',
action = function(zone)
local QBCore = exports['qb-core']:GetCoreObject()
QBCore.Functions.Notify('This is a box!', '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
}
})
RemoveEntity
This export removes a entity target that you have created.
Argument
Description
identifier
The unique string identifier of the target you want to remove