> For the complete documentation index, see [llms.txt](https://docs.kojascripts.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kojascripts.eu/free/carmarket/configuration/parking.md).

# Parking

Players can buy individual **market slots** within zones, pay weekly rent, and park their listed vehicles there. This page covers the slot-level settings.

***

## Settings

{% code title="shared/config.lua" %}

```lua
Config.Parking = {
    SlotPrice = 10000,           -- one-time slot purchase
    SlotWeeklyFee = 2000,        -- recurring rent (auto-charged every 7 days)
    MaxSlotsPerParking = 30,
    SpacesPerPage = 10,          -- pagination in the My Cars UI
}
```

{% endcode %}

| Field                | Default | Purpose                                                  |
| -------------------- | ------- | -------------------------------------------------------- |
| `SlotPrice`          | `10000` | What the player pays once to buy a slot                  |
| `SlotWeeklyFee`      | `2000`  | Auto-charged from the slot owner's **bank** every 7 days |
| `MaxSlotsPerParking` | `30`    | Hard cap for external parking owners adding slots        |
| `SpacesPerPage`      | `10`    | UI pagination — how many slots per page                  |

***

## Weekly fee flow

Every minute the server runs a sweep over expired `next_payment_at` timestamps:

1. Player owns slot → `SlotWeeklyFee` due.
2. Server attempts `removeMoney('bank')`.
3. **Success** — `next_payment_at` rolled forward by 7 days.
4. **Failure** (no funds) — slot is freed, listing in it is removed from the market.

{% hint style="warning" %}
Players who can't afford the fee lose the slot **and** the listing parked in it. Set `SlotWeeklyFee = 0` to disable rent entirely.
{% endhint %}

***

## Free slots

Set both prices to zero to make slots free:

```lua
Config.Parking = {
    SlotPrice = 0,
    SlotWeeklyFee = 0,
    MaxSlotsPerParking = 30,
    SpacesPerPage = 10,
}
```

In this mode, players can claim any vacant slot for free and there's no auto-eviction.
