# Configuration

Here is the full `config.lua` for **Imperium Selldrugs**.

Voice lines are available in both **English** and **French**. To use the French voices, please open a ticket on our Discord: <https://discord.gg/u5TxHBjQdS>-

```lua
--[[
  ___ __  __ ___  ___ ___ ___ _   _ __  __    ___  ___ ___ ___ ___ _____ ___ 
 |_ _|  \/  | _ \| __| _ \_ _| | | |  \/  |  / __|/ __| _ \_ _| _ \_   _/ __|
  | || |\/| |  _/| _||   /| || |_| | |\/| |  \__ \ (__|   /| ||  _/ | | \__ \
 |___|_|  |_|_|  |___|_|_\___|\___/|_|  |_|  |___/\___|_|_\___|_|   |_| |___/
                                                                           
  TEBEX   : https://imperium-scripts.tebex.io
  GITBOOK : https://imperiumscripts.gitbook.io/imperium-scripts/
  DISCORD : https://discord.gg/u5TxHBjQdS
--]]

Config = {}

-- ═══════════════════════════════════════════════════════════════
-- LOCALE SETTINGS
-- ═══════════════════════════════════════════════════════════════

Config.Locale = 'en' -- Language: 'en', 'fr', 'es', 'pt', 'de', 'it'
Config.Locales = {} -- Do not touch, handled by init.lua

-- ═══════════════════════════════════════════════════════════════
-- FRAMEWORK & SYSTEMS
-- Set to 'auto' for automatic detection or specify manually
-- ═══════════════════════════════════════════════════════════════

Config.Framework = 'auto'           -- 'auto', 'ESX', 'QBCore'
Config.InventorySystem = 'auto'     -- 'auto', 'ox_inventory', 'qb-inventory', 'qs-inventory', 'esx_inventory'
Config.NotificationSystem = 'auto'  -- 'auto', 'ox_lib', 'esx', 'qbcore', 'okokNotify', 'mythic'
Config.TargetSystem = 'auto'        -- 'auto', 'ox_target', 'qb-target', 'qtarget'


-- ═══════════════════════════════════════════════════════════════
-- KEY SYSTEM MODE
-- ═══════════════════════════════════════════════════════════════

Config.KeyMode = 'virtual'  -- 'item' or 'virtual'
                            -- 'item': Keys are inventory items with metadata
                            -- 'virtual': Keys stored in memory (lost on restart)

-- Item-based key settings (only used when KeyMode = 'item')
Config.KeyItemName = 'vehicle_key'  -- Inventory item name for keys

-- ═══════════════════════════════════════════════════════════════
-- LOCK / UNLOCK SETTINGS
-- ═══════════════════════════════════════════════════════════════

Config.LockRange = 15.0             -- Maximum distance to lock/unlock vehicle (meters)
Config.EnableSounds = true          -- Play lock/unlock sounds
Config.EnableAnimations = true      -- Play player animations when locking
Config.EnableLightFlash = true      -- Flash vehicle lights on lock/unlock

Config.LockSound = 'Lock_On'        -- Sound name for locking
Config.UnlockSound = 'Lock_Off'     -- Sound name for unlocking
Config.SoundRef = 'Remote_Control_Fob'  -- Sound reference

-- ═══════════════════════════════════════════════════════════════
-- ENGINE PROTECTION
-- ═══════════════════════════════════════════════════════════════

Config.EnableEngineProtection = true    -- Prevent starting engine without key
Config.EngineShutoffDelay = 500         -- Delay before engine shuts off (ms)
Config.AllowPassengerWithoutKey = true  -- Allow passengers without key

-- ═══════════════════════════════════════════════════════════════
-- NPC VEHICLES
-- ═══════════════════════════════════════════════════════════════

Config.NPCVehiclesLocked = false         -- NPC vehicles spawn locked by default
Config.NPCVehicleEngineOff = true       -- NPC vehicles spawn with engine off

-- ═══════════════════════════════════════════════════════════════
-- KEY SHARING
-- ═══════════════════════════════════════════════════════════════

Config.KeyShareRange = 5.0              -- Maximum distance to share keys
Config.RequireOwnerToShare = true       -- Only owner can share/revoke keys
Config.MaxSharedKeys = 5                -- Maximum players that can have keys to same vehicle

-- ═══════════════════════════════════════════════════════════════
-- KEYBINDS & COMMANDS
-- ═══════════════════════════════════════════════════════════════

Config.Keybinds = {
    LockVehicle = 'U',                  -- Default key to lock/unlock vehicle
    EnableKeybind = true                -- Enable the keybind system
}

Config.Commands = {
    Lock = 'lock',                      -- Command to lock vehicle
    Unlock = 'unlock',                  -- Command to unlock vehicle  
    ToggleLock = 'togglelock',          -- Command to toggle lock state
    GiveKeys = 'givekeys',              -- Command to give keys to nearby player
    RemoveKeys = 'removekeys',          -- Admin command to remove keys
    Engine = 'engine'                   -- Command to toggle engine
}

-- ═══════════════════════════════════════════════════════════════
-- OWNERSHIP DETECTION
-- ═══════════════════════════════════════════════════════════════

-- How to detect if player owns a vehicle when they first enter
Config.OwnershipDetection = {
    -- Check if spawned via owned vehicle system (garage)
    CheckSpawnedVehicles = true,
    
    -- Automatically give key when player spawns owned vehicle
    AutoKeyOnSpawn = true,
    
    -- For NPC vehicles, mark them as "stolen" - no auto key
    MarkNPCAsStolen = true
}

-- ═══════════════════════════════════════════════════════════════
-- TEXTUI SETTINGS
-- ═══════════════════════════════════════════════════════════════

Config.TextUI = {
    Resource = 'is-textui',         -- TextUI resource name (jg-textui, is-textui, etc.)
    EnableTextUI = true             -- Show TextUI prompts
}

-- ═══════════════════════════════════════════════════════════════
-- HOTWIRE SETTINGS
-- ═══════════════════════════════════════════════════════════════

Config.Hotwire = {
    Enabled = true,                 -- Enable hotwiring system
    Key = 'H',                      -- Key to start hotwire
    Range = 2.0,                    -- Max distance to hotwire (must be in/near vehicle)
    Duration = 10000,               -- Hotwire duration in ms
    SuccessChance = 70,             -- Success chance percentage
    PoliceAlert = true,             -- Alert police on hotwire
    RequireVehicleLocked = false,   -- Only allow hotwire on locked vehicles
    UseMinigame = true,             -- Use minigame instead of progress bar
    MinigameType = 1,        -- 'random', 1 (Wires), 2 (Sequence), 3 (Timing)
    MinigameTimeLimit = 0,         -- Time limit in seconds
    ClassMinigames = {              -- Optional: Override minigame by vehicle class
        [8] = 2,                    -- Motorcycles -> Sequence
        [14] = 3,                   -- Boats -> Hex Crack
        [15] = 2,                   -- Helicopters -> Sequence
        [16] = 2,                   -- Planes -> Sequence
        [18] = 3,                   -- Emergency -> Hex Crack
        [20] = 3                    -- Commercial -> Hex Crack
    }
}

-- ═══════════════════════════════════════════════════════════════
-- ADMIN SETTINGS
-- ═══════════════════════════════════════════════════════════════

Config.AdminGroups = {
    'admin',
    'superadmin',
    'god'
}

-- ═══════════════════════════════════════════════════════════════
-- DEBUG MODE
-- ═══════════════════════════════════════════════════════════════

Config.Debug = false  -- Enable debug prints in console

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://imperiumscripts.gitbook.io/imperium-scripts/scripts/imperium-smart-keys/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
