Configuration

Configuration (config.lua)

The config.lua file contains all settings for the menu. Adjust these options to customize the menu, save/load system, restrictions, and other features.

Config = {}

------------------------------------------------------------
-- General Settings
------------------------------------------------------------
Config.Locale = "en"            -- Language locale (en, es, fr, etc.)
Config.DefaultKey = "F10"       -- Default key to open the menu
Config.EnableDesigns = true     -- Enable vehicle designs (some vehicles use designs instead of liveries or both)

------------------------------------------------------------
-- Save / Load System Settings
------------------------------------------------------------
Config.SaveLoadSystem = {
    enabled = true,             -- Enable saving/loading saved configurations for vehicles per user
    storageType = "file",       -- Storage method: "file" or "oxmysql" (MySQL is recommended)
    maxSlots = 5,               -- Maximum number of slots per player
    saveDirectory = "data"      -- Directory to save files (only used if storageType = "file")
}

------------------------------------------------------------
-- Vehicle Restrictions
------------------------------------------------------------
Config.Restrictions = {
    requireDriverSeat = true,   -- Require player to be in the driver seat to use the menu
    useWhitelist = false,       -- true = use whitelist, false = use blacklist

    blacklistedVehicles = {     -- Vehicles that cannot use the menu (only if useWhitelist = false)
        "nightshark"
    },

    whitelistedVehicles = {     -- Vehicles allowed to use the menu (only if useWhitelist = true)
        -- Add vehicle names here
    }
}

------------------------------------------------------------
-- Misc Settings
------------------------------------------------------------
Config.MaxExtrasToCheck = 20        -- Maximum number of vehicle extras to check
Config.AllowAutomaticSetup = true   -- Automatically setup database (set false if already configured)

------------------------------------------------------------
-- Theme
------------------------------------------------------------
-- The menu theme can be customized in the html/style.css file
-- Modify the CSS variables to change colors, fonts, and layout

General Settings

Option
Description
Default

Config.Locale

Language locale (e.g., "en", "es", "fr")

"en"

Config.DefaultKey

Default key to open the menu. Players can override via GTA settings

"F10"

Config.EnableDesigns

Enable vehicle designs (some vehicles use designs instead of liveries, or both)

true


Save / Load System

Option
Description
Default

Config.SaveLoadSystem.enabled

Enable saving/loading vehicle configurations per player

true

Config.SaveLoadSystem.storageType

Storage method: "file" for JSON or "oxmysql" for MySQL database

"file"

Config.SaveLoadSystem.maxSlots

Maximum number of save slots per player

5

Config.SaveLoadSystem.saveDirectory

Folder to save JSON files (only used if storageType = "file")

"data"


Vehicle Restrictions

Option
Description
Default

Config.Restrictions.requireDriverSeat

Require player to be in the driver seat to open the menu

true

Config.Restrictions.useWhitelist

true = whitelist mode; false = blacklist mode

false

Config.Restrictions.blacklistedVehicles

Array of vehicle models that cannot use the menu when in blacklist mode

["nightshark"]

Config.Restrictions.whitelistedVehicles

Array of vehicle models allowed to use the menu when in whitelist mode

[]


Misc Settings

Option
Description
Default

Config.MaxExtrasToCheck

Maximum number of vehicle extras to scan (increase for heavily modded vehicles)

20

Config.AllowAutomaticSetup

Automatically create MySQL tables if using oxmysql

true


Theme

The NUI menu theme can be customized in html/style.css. Modify CSS variables to change colors, fonts, and layout.

💡 Tip: Adjusting CSS variables allows you to create a custom look without modifying the JavaScript or Lua files.

Last updated

Was this helpful?