Custom Events
Adding your own custom events/triggers into Dirty Cops Is SUPER easy. Below I will show you step by step how to add a Function and target option!
Target Option:
{
name = 'ox:option9',
icon = 'fa-solid fa-money-bill',
label = 'Test Function',
canInteract = function(entity, distance, coords, name, bone)
if distance < 2 then
return true
else
return false
end
end,
onSelect = function()
TestFunction() -- 'YOUR TEST FUNCTION'
end
}
Adding the Function:
function TestFunction()
-- Do anything you want here
end