Koja Scripts

Installation

Welcome to Koja-Carmarket, a player-driven car market with auctions, exchange zones, rentable parking slots and test drives.

Installation

Welcome to Koja-Carmarket, a player-driven car market with auctions, exchange zones, rentable parking slots and test drives. This guide walks you through the install end-to-end.

πŸ“‹ Requirements

Before installing Koja-Carmarket, make sure the following resources are present and start before koja-carmarket:

  • koja-lib β€” framework bridge (ESX / QBCore detection, money helpers, callback API)
  • oxmysql β€” database driver
  • ox_target (optional) β€” targeted interactions; falls back to draw-text + key if missing

πŸš€ Installation

  1. Drop the resource into resources

    Place the unpacked koja-carmarket folder anywhere inside resources/ (e.g. resources/[koja]/koja-carmarket).
    resources/
    └── [koja]/
        β”œβ”€β”€ koja-lib/
        └── koja-carmarket/
    
  2. Install dependencies

    Follow the install instructions for each:
  3. Database setup

    Tables are created automatically on first start. Confirm this in shared/config.lua:
    shared/config.lua
    Config.Database = {
        AutoCreateTable = true,
    }

    Option B β€” Manual SQL import

    Run database.sql against your database manually and set AutoCreateTable = false.
  4. Configure server.cfg (order matters)

    ensure oxmysql
    ensure ox_target      # optional
    ensure koja-lib
    ensure koja-carmarket
  5. First-run smoke test

    1. Start the server.
    2. Look for [koja-carmarket] Table … created. or … already exists lines in the console.
    3. Go to one of the default market zones (e.g. Mark, coords -2187, -409, 13) β€” there should be an NPC with a Car Market interaction.
    4. Open the tablet and verify the UI loads in your Config.Locale.
  • Configuration β€” Configure zones, parking, exchange rules, test drives, and custom images.
  • Features β€” Player-facing flows and core marketplace features.
  • Exports & Commands β€” All public API surface of koja-carmarket.
  • Database β€” Full reference for every table created by koja-carmarket.
  • Zones β€” Market zones define where players can list and buy vehicles.
  • CarMarket β€” back to the section overview