Page cover

Config Files

The script is fully configurable, enabling you to tailor its behavior and features to your needs. Below is a list of the configuration files included in the resource.

--============================================================--
-- iZaap Scripts — Garage 

Config = Config or {}

Config.Framework = Config.Framework or "auto" 
Config.CustomCore = Config.CustomCore or {
  Resource = "my_core",
  Export = "GetCoreObject"
}

Config.Locale = "es" -- "es" | "en"

Config.FuelDependency = "legacyfuel" -- Options: "none", "qb-fuel", "legacyfuel"
Config.KeysDependency = "qb-vehiclekeys" -- Options: "qb-vehiclekeys", "qbx_vehiclekeys", "brutal_keys"

Config.EnableVehicleImages = true

--============================================================--
-- RECOVER (Tow / Recover fee)
--============================================================--
Config.Recover = Config.Recover or {}
if Config.Recover.Enabled == nil then Config.Recover.Enabled = true end

Config.Recover.TowFee        = 200
Config.Recover.TowFeeAccount = "bank" -- "cash" | "bank"

--============================================================--
-- TRANSFER (Vehicle transfer fee)
--============================================================--
Config.Transfer = Config.Transfer or {
  Enabled = true,
  Fee     = 100,
  Account = "bank", -- "cash" | "bank"
}

--============================================================--
-- PEDS (Garage / Impound)
--============================================================--

Config.GaragePed = {
  DefaultModel    = "s_m_m_security_01",
  InteractRadius  = 2.2, -- distance to interact
}

Config.ImpoundPedModel = "ig_floyd"

--============================================================--
-- INTERACTION MODE
--============================================================--
Config.Interaction = {
  Mode = "textui", -- "textui" | "qb-target" | "ox-target" | "auto"

  Target = {
    Enabled       = true,
    Label         = "Open Garage",
    ImpoundsLabel = "Open Impound",
    Icon          = "fas fa-warehouse",
    Distance      = 4.0,
  }
}

Config.TextUI = {
  Enabled = true,

  Open = function(message)
    exports["jg-textui"]:DrawText("[E] Open Garage", message)
  end,

  Close = function()
    exports["jg-textui"]:HideText()
  end
}

--============================================================--
-- MARKERS (Visual marker at garages)
--============================================================--
Config.GarageMarker = {
  Enabled = true,
  Rotate  = true,
  ZOffset = 0.95,

  -- Type = 36,
  -- Scale = { x = 0.8, y = 0.8, z = 0.8 },
  -- Color = { r = 255, g = 214, b = 0, a = 180 },
  -- BobUpAndDown = false,
  -- FaceCamera = false,
}

--============================================================--
-- BLIPS 
--============================================================--
Config.Blips = {
  Enabled    = true,
  ShortRange = true,
  Display    = 4,
  Scale      = 0.65,

  -- If you use per-type sprites in the admin panel client:
  -- DefaultSprite = 50,
  -- Color = 3,
  -- SpritesByType = { public = 50, job = 357, gang = 84, private = 50, impound = 67 },

  -- Simple impound fallback
  impound = { blipId = 67, blipColor = 1},
}

--============================================================--
-- GARAGE INTERACT LOOP
--============================================================--
Config.GarageInteract = {
  UseGarageRadius = true, -- respects per-garage radius if stored
  Extra           = 0.0,  -- extra distance buffer
  Key             = 38,   -- 38 = E

  SleepFar        = 800,  -- ms when far away (performance)
  SleepNear       = 0,    -- ms when near (responsive)
}

--============================================================--
-- VEHICLE STATE VALUES (DB compatibility)
--============================================================--
-- "stored" and "out" values used by your database/resource.
Config.StoredStateValue = 1
Config.OutStateValue    = 0
--============================================================--
-- IMPOUND (Advanced pricing / time)
--============================================================--
Config.Impound = Config.Impound or {}
Config.Impound.Advanced = {
  -- Caps (to prevent insane fees)
  maxPriceAfterImpoundDate  = 6500,
  maxPriceBeforeImpoundDate = 14500,

  -- Defaults if the vehicle/impound row has no custom values
  defaultFeeAfter  = 2500,
  defaultFeeBefore = 0,

  -- Default selected time option (hours as string)
  -- "0" = available instantly
  defaultTimeValue = "72", -- 3 days

  -- Dropdown options (label shown in UI, value used internally)
  timeOptions = {
    { label = "Available Instantly", value = "0"   },
    { label = "1 Day",              value = "24"  },
    { label = "5 Days",             value = "120" },
    { label = "7 Days",             value = "168" },

    -- Use a very large value to represent "Only faction members"
    -- (Your UI can display it as "Restricted")
    { label = "Only By faction.",   value = "99999999" },
  }
}

--============================================================--
-- COMMANDS
--============================================================--
Config.Commands = Config.Commands or {
  AdminPanel       = "garageadmin",

  GiveCar          = "givecar",
  DeleteCar        = "dvcar",
  ChangePlate      = "changeplate",


  Impound          = "impound",
  JobImpoundsPanel = "panelimpounds",
}

-- Only these 3 are toggleable as you requested:
Config.CommandsEnabled = Config.CommandsEnabled or {
  GiveCar     = true,
  DeleteCar   = true,
  ChangePlate = true,
}

--============================================================--
-- SPAWN QUALITY
--============================================================--
Config.FixHealthOnSpawn = true

Last updated