> 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/features/parking-slots.md).

# Parking Slots

Before a player can list a car, they need at least **one parking slot** in the zone they want to list in. Slots are individual boxes within `Config.Zones[X].CarMarketBoxes`.

***

## Buying a slot

{% stepper %}
{% step %}

### Open the tablet → "My cars"

The page shows all zones with their slot grids.
{% endstep %}

{% step %}

### Click an empty slot

Empty slots are highlighted. You'll see a confirmation modal with the price and weekly fee.
{% endstep %}

{% step %}

### Confirm purchase

`Config.Parking.SlotPrice` is removed from your bank, and you now own that slot.

{% hint style="info" %}
If a zone owner exists, **they receive the slot purchase money**. Otherwise it's just deducted (server keeps it).
{% endhint %}
{% endstep %}
{% endstepper %}

***

## Using a slot

Once owned, the slot shows as **Free** until you list a car into it. Through the **Sell car** flow, the system auto-picks the closest free slot you own in the target zone.

You can also **move** a parked vehicle to a different slot via **My cars → click occupied slot → Move**.

***

## Weekly fees

Every 7 days, `Config.Parking.SlotWeeklyFee` is deducted from your bank.

| Outcome  | What happens                                                     |
| -------- | ---------------------------------------------------------------- |
| ✅ Paid   | `next_payment_at` rolls forward 7 days                           |
| ❌ Unpaid | Slot is freed, listing in it (if any) is removed from the market |

{% hint style="warning" %}
Auto-eviction is **silent**. The player won't get a popup — only a tablet refresh will show their car is gone. Consider hooking into `koja_carmarket:client:vehicleSold` to notify the original owner.
{% endhint %}

***

## Slot states (UI)

| State            | Color  | Meaning                                |
| ---------------- | ------ | -------------------------------------- |
| `not_purchased`  | grey   | Available to buy                       |
| `owned_by_other` | red    | Another player owns this slot          |
| `free`           | green  | You own it; assign a vehicle           |
| `occupied`       | blue   | You own it; a vehicle is parked here   |
| `expired`        | yellow | Fee unpaid; slot will be freed shortly |
