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:

client/Cutils.lua
{
  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:

client/Cutils.lua
function TestFunction()
    -- Do anything you want here
end