Kartik Scripts

Configuration

The kartik-dealership resource is highly configurable. The configuration is split into several files in the shared directory.

Main Configuration (shared/config.lua)

This file contains general settings for categories, brands, test drives, and core logic.

General Settings

  • Config.DefaultGarage: The default garage where purchased vehicles are delivered.
  • Config.PlateFormat: Define the format for generated license plates (e.g., NLLNNNLL).
  • Config.RepoDays: Maximum days a vehicle can be seized before it is fully repossessed.
  • Config.AllowSellToDealer: Enable or disable the ability for players to sell their vehicles to the dealership.
  • Config.SellToDealerDepreciation: The multiplier applied to the base price when selling to the dealer (e.g., 0.6 for 60%).

Dynamic Pricing

Config.DynamicPricing = {
    enabled = true,
    demandMultiplier = 0.05,  -- +5% per pending unit
    maxMultiplier = 1.5,      -- cap at 150% of base price
    minMultiplier = 0.8       -- cap at 80% of base price
}

Test Drive Settings

  • Config.TestDriveAmount: The cost to start a test drive.
  • Config.EnableTestDriveTimer: Toggle the time limit for test drives.
  • Config.TestDriveTime: Duration of the test drive in seconds.
  • Config.SpeedTargets: Definition of speed goals for the test drive UI.
  • Config.DistanceTargets: Definition of distance goals (e.g., Half Mile, One Mile).

Rental Settings

  • Config.Rental.maxDays: Maximum duration for a vehicle rental.
  • Config.Rental.deposit: Security deposit amount.
  • Config.Rental.taxRate: Tax rate applied to the rental cost.

Showrooms (shared/config_showrooms.lua)

This file defines the different showrooms available on your server.

Each showroom entry includes:

  • label: The name displayed in the UI and on the map.
  • enableBlip: Toggle the map blip.
  • blip: Customize the blip ID, coordinates, color, and scale.
  • zone: A polygon definition for the showroom area (used for spawning display vehicles).
  • sellZones: Areas where players can initiate selling their vehicles.
  • CustomerTab/ManagementTab: Coordinates and sizes for the interaction zones.
  • delivery: Spawn points for purchased vehicles.

Classes & Scoring (shared/config_classes.lua)

Defines how vehicles are ranked based on their performance stats.

  • Config.Classes: Maps performance scores (0-100) to classes (S, A, B, C, D).
  • Config.Parameters: The weights for different performance metrics:
    • acceleration: 35%
    • topSpeed: 30%
    • handling: 20%
    • braking: 15%

Server Settings (shared/config_server.lua)

Contains sensitive server-side settings.

  • ServerConfig.AdminWebhook: Discord webhook for administrative logging (e.g., NUI exploit detection).
  • ServerConfig.DiscordBotToken: Used for Discord API integrations.
  • ServerConfig.GuildID: Your server's Discord Guild ID.

On this page