Koja Scripts
FREE

Zones

Market zones define where players can list and buy vehicles.

Zones

Market zones define where players can list and buy vehicles. Each zone has an NPC, a blip, and a set of parking slot boxes (where vehicles are physically displayed for sale).

Structure

shared/config.lua
Config.Zones = {
    {
        id = "zone1",
        coords = vector4(-2187.8787, -409.0271, 13.1511, 231.3093),
        distance = 1.5,
        name = "Mark",
        blip = {
            sprite = 1,
            colour = 1,
            scale = 1.0,
            display = 4,
        },
        npc = {
            name = "Mark",
            hash = 0x18CE57D0,
            scenario = "WORLD_HUMAN_CLIPBOARD",
            target = {
                icon = "fas fa-shopping-basket",
                label = "Mark - Car Market",
                distance = 2.0,
                key = 38,
            },
        },
        CarMarketBoxes = {
            { id = 'zone1_slot1', coords = vec3(-2160.43, -402.35, 13.39), size = vec3(3, 5, 3), rotation = 82.9 },
            { id = 'zone1_slot2', coords = vec3(-2159.97, -396.41, 13.39), size = vec3(3, 5, 3), rotation = 82.9 },
            { id = 'zone1_slot3', coords = vec3(-2158.71, -390.22, 13.39), size = vec3(3, 5, 3), rotation = 82.9 },
        },
    },
    -- more zones...
}

Fields

FieldTypePurpose
idstringUnique identifier (referenced in DB, slot ownership, etc.)
coordsvector4NPC position + heading
distancenumberInteraction radius (meters)
namestringDisplay name (shown in UI)
bliptableStandard FiveM blip config
npctablePed model + scenario + targeting config
CarMarketBoxestable[]Slot boxes where listed vehicles spawn

CarMarketBoxes

Each box represents one physical slot in the world.

FieldTypePurpose
idstringUnique slot ID — players buy individual slots by this
coordsvec3World position of the slot
sizevec3Bounding box used for proximity checks
rotationnumberHeading the vehicle spawns with

Adding a new zone

  1. Pick coords in-game

    Use /copycoords from koja-lib or any dev tool to grab vector4 for the NPC spawn.
  2. Add the zone entry

    Append a new table to Config.Zones with a unique id.
  3. Place slot boxes

    Walk around the parking area and place 3–10 CarMarketBoxes. Each coords should be the center of where a parked car will sit.
  4. Restart and test

    refresh and restart koja-carmarket. The blip + NPC should appear at the new zone.

Default zones shipped

Zone IDNameLocation
zone1MarkMark's car shop, near La Mesa
zone2LegionLegion Square
zone3Sandy ShoresSandy Shores
zone4LotniskoLSIA airport area
zone5PaletoPaleto Bay

Feel free to remove or replace any of them — they're examples.

  • Configuration — Configure zones, parking, exchange rules, test drives, and custom images.
  • Features — Player-facing flows and core marketplace features.
  • Installation — Welcome to Koja-Carmarket, a player-driven car market with auctions, exchange zones, rentable parking slots and test drives.
  • Exports & Commands — All public API surface of koja-carmarket.
  • Database — Full reference for every table created by koja-carmarket.
  • CarMarket — back to the section overview