> For the complete documentation index, see [llms.txt](https://jota-dev-documentation.gitbook.io/jota-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jota-dev-documentation.gitbook.io/jota-dev/scripts/jota-dev-garage-system.md).

# Jota Dev Garage System

<figure><img src="/files/lbN3u8sO53lRS9vRCiEm" alt=""><figcaption></figcaption></figure>

How to start the script for its correct operation:

**Put in your server.cfg**

```markdown
# JotaDev Garage System
ensure jc_garages
```

***

**Garage Script Settings:**

{% tabs %}
{% tab title="Setting" %}
{% code expandable="true" %}

```lua
Config = Config or {}

Config.Framework = 'auto' -- 'esx', 'qb', 'auto' or 'standalone'

--[[  
Configure your language using the following:
    'es' -> Spanish
    'en' -> English
    'fr' -> French
    'de' -> German
    'it' -> Italian
    'pt' -> Portuguese
    'pl' -> Polish
    'zh' -> Chinese
]]
Config.Locale = 'en'

Config.Notify = {
    Notification = 'ox_lib', -- 'ox_lib' // 'esx_framework' // 'qb-core'
    DurationMs   = 5000,
}

Config.KeysSystem = 'auto' -- 'auto', 'jc_vehiclekeys', 'qs-vehiclekeys', 'wasabi_carlock', 'brutal_keys', 'qbx_vehiclekeys', 'qb-vehiclekeys'

Config.Interaction = {
    system   = 'press', -- 'press' or 'target'
    key      = 38,
    target   = 'auto', -- ox_target / qb-target
    distance = 2.5,
}

Config.Impound = {
    default_fee = 500, -- Default impound fee when none is supplied.
    max_fee = 10000, -- Hard cap on the total fee.
    police_jobs = { -- List of job names treated as police.
        'police', 'sheriff', 'sasp', 'lspd', 'state', 'bcso', 'lssd', 'doj',
    },
    police_free_release = true, -- Police pay no fee when releasing from the impounds list
    target = 'auto', -- 'ox_target', 'qb-target' or 'auto' (auto will check for both)
    commands = {
        impound = { -- Impound the nearest vehicle
            enabled = true,
            name    = 'impound',
        },
        impounds = { -- List all impounds from the server
            enabled = true,
            name    = 'impounds',
        },
    },
}

Config.Odometer = { -- Odometer system for counting the kilometers or miles of a vehicle
    enabled             = true,
    units               = 'km', -- 'km' or 'miles'
    tick_distance       = 25.0,
    depreciation_per_km = 0.0008,
    min_factor          = 0.20,
    max_factor          = 1.0,
}

Config.Parking = { -- Garage parking system, you can activate or deactivate it as you wish
    enabled                 = true,
    store_job_fleet         = false, -- true = fleet job vehicles can be stored in any garage / auto-parked. false = only in matching job garages.
    only_save_locked        = false, -- It allows you to store the vehicle only when the car is locked.
    max_per_player          = 5, -- Maximum number of vehicles a player can have parked outside
    show_blips              = true, -- true = show map blips for the player's parked vehicles
}

Config.FakePlate = {
    enabled     = true, -- Activates or deactivates the fake license plate system
    owned       = true, -- If true, only the owner of the vehicle can remove the fake plate
    item = {
        name        = 'fake_plate', -- The name of the item that is required to remove the fake plate
        required    = false, -- If true, the player must have the item in their inventory to remove the fake plate
        remove_item = false, -- If true, the item will be removed from the player's inventory when the fake plate is removed
    },
}

Config.Transfer = {
    enabled        = true, -- Activates or deactivates the vehicle transfer system
    garage_move    = true, -- If true, the player can move the vehicle to a different garage
    allow_free     = true,
    allow_paid     = true,
    tax_percent    = 0,
    max_distance_m = 8.0,
}

Config.Interior = {
    show_exit_marker = true, -- If true, the exit marker will be shown
    default_capacity = 4, -- The default capacity of the interior
    slot_spacing     = 3.5, -- The spacing of the slots
    slot_forward     = 6.0, -- The forward distance of the slots
}

Config.Garage = {
    admin_bypass_restricted = false, -- If true, the admin will bypass the restricted areas
    allow_purchase         = true, -- If true, the garage can be purchased
    default_recovery_price = 250, -- The default recovery price for a vehicle
    default_purchase_price = 1500, -- The default purchase price for a garage
    enforce_capacity       = true, -- If true, the garage will enforce a maximum number of vehicles per owner
    allow_share_management = true, -- If true, the garage will allow the player to share the garage with other players
    default_zone_thickness = 4.0, -- The default thickness of the zone
    raycast_spawn_enabled   = false, -- If true, the player can spawn a vehicle in the garage
    raycast_require_in_zone = false, -- If true, the player can only spawn a vehicle in the garage if they are in the zone
    default_purchase_garage = 'legion_square', -- The default garage to purchase
}

Config.Rental = {
    default_max_days    = 7, -- The default maximum number of days the vehicle can be rented for
    expiry_check_min    = 5, -- The minimum number of days before the vehicle expires to check for expiry
    auto_repo_on_expiry = true, -- If true, the vehicle will be automatically returned to the garage when it expires
}

Config.Panel = {
    open_command        = 'garageadmin', -- The command to open the garage admin panel
    ace_permission      = 'command.jcgarage.admin',
    allowed_groups      = { 'admin', 'superadmin', 'mod' }, -- The groups that are allowed to open the garage admin panel
    allowed_jobs        = { 'admin' }, -- The jobs that are allowed to open the garage admin panel
    allowed_identifiers = {
        'char1:de99999999999999999999999999999999999999', -- The identifiers that are allowed to open the garage admin panel
    },
}

Config.Money = { 
    account = 'cash', -- The account to use for the vehicle purchase and rental
    society = false, -- If true, the vehicle purchase and rental will be paid for by the society
}

Config.Vehicle = {
    import_existing_on_first_start = true,
    deduplicate_on_take_out        = true,
    auto_park_after_idle_ms        = 0,
    default_fuel                   = 100,
    default_engine_health           = 1000.0,
    default_body_health             = 1000.0,
}

Config.Debug = false
```

{% endcode %}
{% endtab %}

{% tab title="Api" %}

```lua
-- Before starting this, read the documentation to learn how to set up the Fivemanage API: 
-- https://jota-dev-documentation.gitbook.io/jota-dev/scripts/jota-dev-garage-system/configuration/basic-configuration

Config.Api = {
    fivemanage = {
        api_key = '',
        community_imgs = true, -- This activates image sharing across the entire community, so all images will be synchronized and you can upload images to the community without any problems.
    },
}
```

{% endtab %}
{% endtabs %}

<details>

<summary>If you have any questions or problems, do not hesitate to contact us:</summary>

Discord: [`https://discord.gg/EDuZKM7Zuv`](https://discord.gg/EDuZKM7Zuv)

</details>
