A completely rewritten and optimised targeting solution based on bt-target
exports.qtarget:AddTargetEntity(entity, parameters)
AddEventHandler('eventname', function(data)
print(data.label, data.num, data.entity)
end)
exports.qtarget:AddTargetEntity(entity, {
options = {
{
event = "eventname",
icon = "fas fa-box-circle-check",
label = "action 1",
num = 1
},
{
event = "eventname",
icon = "fas fa-box-circle-check",
label = "action 2",
num = 2
},
},
distance = 2
})
exports.qtarget:RemoveTargetEntity(entity, {
'action 1', 'action 2'
})