SickScripts Documentation
SickScripts DiscordProject ALPHA DiscordTebex Store
  • Overview
    • 💡SickScripts
    • ✨Useful Links
    • 🎯Newest ESX
  • Shared Framework
    • 👮SickDirtyCops
      • Robbery Trigger
      • Installation
      • Config
      • Buy/Sell Shop
      • Updates
      • Custom Events
    • 🚗Sick2Step
      • SetUp
      • Usage
    • 🌱SickTrapHouses
      • Installation
      • Events
    • 🗒️SickWarrants
      • Events
      • Examples
    • 💣SickCarBombs
      • Items
      • Config
    • 📎SickLockers
      • Config
      • Events
      • QBCore Users
    • 💰SickMoneyWash
      • Usage
      • Config
    • 🗺️SickTeleport
      • Installation
      • Default Locations
      • Donators
      • Config
  • ESX Scripts
    • 🎟️SickFines-PEFCL
      • Events
    • 🧑‍💼SickTraders
      • Traders
    • 🌭SickFoodStands
    • 🍔SickUpNAtom
      • General info
      • Ordering
      • Job Info
      • Boss Menu
  • 🔒SickJail
    • Events/Exports
    • Examples
    • Jobs
    • Drug Bag
    • Prison Break
    • Stashes
  • 📄SickReports
    • Options
  • 🇫🇲SickSafeZones
    • Info
    • Music
    • AirDrops
    • ScrapCars
  • QBCore
    • 🏨SickApartmentSelect
Powered by GitBook
On this page
  • Target Option:
  • Adding the Function:
  1. Shared Framework
  2. SickDirtyCops

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
PreviousUpdatesNextSick2Step
👮