DirkScripts Documentation
  • 👋Welcome
  • The Basics
    • ⬇️Installing Resources
  • Resources
    • 📚Dirk Lib
      • Getting Started
      • Cache
      • Modules
        • Await
        • Blip
        • Callback
        • Camera
        • File
        • Interact
        • Objects
        • Player
          • Client
          • Server
        • Groups
          • Client
          • Server
        • Print
        • Request
        • Table
        • Target
        • Zones
        • UI
          • Context
          • Untitled
    • 🔧Project Cars
      • Installation
      • Tools
      • Parts
      • Commands
    • 🤼Multicharacter
      • Installation
      • Configuration
      • Exports
      • F.A.Q
      • Commands
    • 💊Drug Labs v2
      • Installation
      • Tebex Integration
      • Creating Labs
  • 🛒Store
  • 🗣️Discord
  • 🖥️GitHub
Powered by GitBook
On this page
  • Create Bounty with UI
  • Create Bounty w/o UI
Export as PDF
  1. Resources
  2. Bounty Hunters v2

Create Bounty

Below is an event you can use to create a bounty via code should you ever need to.

Create Bounty with UI

local office = "policeBounties" --## This must correlate to a bounty office
-- within the bountyoffices.lua of dirk-bountiesv2
TriggerServerEvent("bountyoffices:openBountyForm", office)

Create Bounty w/o UI

  local shouldPay  = false
  local bountyData = {
    OriginOffice = "policeBounties", --## This must correlate to a bountyOffice they have in their bountyoffices.lua
    TargetName   = "MB MB",
    TargetID     = "LVL72878",
    DOB          = "2023-08-15",
    Bounty       = 5000,
    
    Reason       = "adwdadawdawdwadaw",
    Description  = "12313asdsdw",
    Image        = "",

    Consequences = {
      Vehicle           = false,
      VehicleReleaseFee = 1322,
      VehiclePlates     = {
        ["41BZC010"] = "issi7",
        ["27CXR234"] = "blista",
      },

      Fine              = true,
      FineAmount        = 1000,
      
      Jail              = true,
      JailTime          = 60,
    },
  }


  TriggerServerEvent("bountyoffice:createNewContract", bountyData, shouldPay)

Last updated 1 year ago

🐶