> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_housing/configuration/marketplace.md).

# Marketplace

Edit `rcore_housing/configs/config.marketplace.lua` to configure marketplace NPCs, listing validation, image gallery rules, and the instant-sell flow.

## 🗺️ Map Blip

```lua
Config.MarketPlace.Blip = {
    Enable = true,
    Sprite = 374,
    Color  = 2,
    Scale  = 0.8,
    Label  = 'Real Estate',
}
```

## 🧍 NPC Locations

```lua
Config.MarketPlace.Locations = {
    {
        pos      = vec4(-267.01, -973.35, 31.22, 300.00),
        npcModel = 'ig_djsoljakob',
        blip     = true,
    },
}
```

Add more entries to spawn marketplace NPCs at additional locations. Set `blip = false` on a per-location basis to suppress its individual map blip.

## 🖼️ Image Service

```lua
Config.MarketPlace.ImageService = {
    Enable           = true,
    MaxGalleryImages = 10,
    RequireThumbnail = false,
}
```

| Option             | Description                                                           |
| ------------------ | --------------------------------------------------------------------- |
| `Enable`           | Allow agents to upload listing thumbnails and gallery images.         |
| `MaxGalleryImages` | Hard cap on gallery images per listing (default `10`).                |
| `RequireThumbnail` | When `true`, listings cannot be created without at least a thumbnail. |

## ✅ Validation

```lua
Config.MarketPlace.Validation = {
    MinPrice              = 1000,
    MaxPrice              = 100000000,
    MaxDescriptionLength  = 500,
    RequirePhoneNumber    = false,
    RequireImages         = false,
}
```

All metadata fields (phone, images) are optional by default. Flip `RequirePhoneNumber` or `RequireImages` to enforce them.

## ⚡ Instant Sell

```lua
Config.MarketPlace.InstantSell = {
    Enable     = true,
    Percentage = 50,
}
```

Instant sell pays the player `Percentage` % of the listed price and re-lists the property under the "city" owner at full price. When someone buys the city-listed property, the resale money is voided (no payout).
