Configuration

Configuration

Edit script/shared/config.lua:

return {
  Debug = false,
  SpawnChance = 20,
  Cooldown = 120,
  AlarmChance = 75,
  DispatchChance = 50,
  MaxLootedVehicles = 50,
  TargetDistance = 0.6,
 
  SkillCheck = {
    difficulty = { "easy", "easy", "medium" },
    inputs = { "w", "a", "s", "d" },
  },
 
  SmashAnimation = {
    duration = 800,
    label = "Breaking window...",
    anim = {
      dict = "veh@break_in@0h@p_m_zero@",
      clip = "std_force_entry_ds",
    },
  },
 
  LootAnimation = {
    duration = 4000,
    label = "Grabbing items...",
    anim = {
      dict = "mini@repair",
      clip = "fixing_a_player",
    },
  },
 
  VehicleFilter = {
    mode = "blacklist",
    allowedClasses = { 0, 1, 2, 3, 4, 5, 6, 7, 9, 12 },
    modelBlacklist = {
      `police`, `police2`, `police3`, `police4`,
      `policeb`, `policet`, `sheriff`, `sheriff2`,
      `ambulance`, `firetruk`, `fbi`, `fbi2`,
      `riot`, `pranger`,
    },
    modelWhitelist = {},
  },
 
  LootTables = {
    { item = "phone", minCount = 1, maxCount = 1, weight = 30 },
    { item = "money", minCount = 50, maxCount = 200, weight = 50 },
  },
 
  Props = {
    models = {
      `prop_cs_heist_bag_01`,
      `hei_prop_heist_box`,
      `prop_ld_case_01`,
    },
    maxPerVehicle = 1,
    offsets = {
      [`prop_cs_heist_bag_01`] = { 0.0, 0.0, 0.25, 0.0, 0.0, 0.0 },
      [`hei_prop_heist_box`] = { 0.0, 0.0, 0.2, 0.0, 0.0, 0.0 },
      [`prop_ld_case_01`] = { 0.0, 0.05, 0.2, 0.0, 0.0, 90.0 },
    },
  },
 
  SeatBones = {
    "seat_pside_f",
    "seat_dside_r",
    "seat_pside_r",
  },
 
  WindowIndices = {
    seat_dside_f = 0,
    seat_pside_f = 1,
    seat_dside_r = 2,
    seat_pside_r = 3,
  },
}

Core Settings

SettingDefaultDescription
DebugfalseEnables ox_target debug visualization and console output
SpawnChance20Percentage chance (1–100) a vehicle spawns with loot
Cooldown120Seconds a player must wait between smash attempts
AlarmChance75Percentage chance the car alarm triggers on a failed skill check
DispatchChance50Percentage chance police are dispatched (rolls on alarm trigger and successful loot grab)
MaxLootedVehicles50Maximum number of vehicles with active loot at once
TargetDistance0.6Interaction distance for window targets

Vehicle Filtering

Two modes are available via VehicleFilter.mode:

  • "blacklist" — All vehicle classes in allowedClasses are eligible except models in modelBlacklist
  • "whitelist" — Only models in modelWhitelist are eligible (ignores classes)

Vehicle class reference: 0=Compacts, 1=Sedans, 2=SUVs, 3=Coupes, 4=Muscle, 5=Sports Classics, 6=Sports, 7=Super, 9=Off-road, 12=Vans.

Loot Tables

Each entry rolls with weighted probability:

FieldTypeDescription
itemstringox_inventory item name
minCountnumberMinimum quantity
maxCountnumberMaximum quantity
weightnumberRelative probability weight (higher = more common)

Props

Visual props appear on vehicle seats to indicate loot. Configure models, max per vehicle, and per-model attachment offsets (x, y, z, rx, ry, rz).