Skip to main content

General Settings

Locale, identifier type, notification system, default theme, debug printing, and avatar count.

This section

General Settings

The first section of shared/config.lua — top-level toggles and defaults.

Options

OptionDefaultDescription
Config.DebugPrintfalseEnable verbose [code9_carplay2] logs in F8 console
Config.Locale"en"Active language file. Available: "en", "tr", "es", "de", "fr", "nl", "pt"
Config.IdentifierType"license"Identifier type used as DB primary key. Options: "license", "steam", "discord", "license2"
Config.NotificationSystem"esx"Notification backend. Options: "gta", "ox_lib", "esx", "qb"
Config.Avatars85Number of preset avatars in web/public/avatars/ (must match files 1.pngN.png)
Config.DefaultTheme"dark"Default theme for new players. Options: "light", "dark", "custom"
Config.DefaultThemeAccent"#007AFF"Accent color when DefaultTheme = "custom" (hex)

Locale

The Config.Locale value tells the script which file under locales/ to load. The locale system is described in detail in Locale System.

To add a new language:

  1. Copy locales/en.lua to locales/your-locale.lua
  2. Translate all values (keep keys unchanged)
  3. Set Config.Locale = "your-locale"

If the configured locale fails to load, the script falls back to en.lua.

Identifier Type

Carplay V2 stores per-player data keyed by a single identifier. The default "license" is the safest choice (always unique, never changes). If you have a different setup:

  • "license2" — newer FiveM license format (also unique)
  • "steam" — only works for players who have Steam linked
  • "discord" — only works for players who have Discord linked to FiveM

The script automatically falls back to "license" if the configured type is missing for a player.

Notification System

Where in-game notifications come from:

ValueBehavior
"gta"Native GTA V notifications (SetNotificationTextEntry + DrawNotification)
"ox_lib"Calls exports.ox_lib:notify(...) — needs ox_lib started
"esx"Calls ESX.ShowNotification(msg) — needs ESX
"qb"Calls QBCore.Functions.Notify(msg, type, 5000) — needs QBCore

If the chosen backend isn't available, the script falls back to GTA native.

Default Theme

When a player completes the first-run setup wizard, this is the theme they start with:

  • "light" — light mode
  • "dark" — dark mode
  • "custom" — uses Config.DefaultThemeAccent as the accent color

After setup, players can change theme any time from Settings → Appearance.

Debug Print

Config.DebugPrint = true produces verbose logs prefixed with [code9_carplay2] in the F8 console. Useful when:

  • Diagnosing framework / inventory / fuel detection
  • Troubleshooting Discord role fetches (look for [DISCORD])
  • Checking mileage provider selection ([MILEAGE])
  • Verifying screen DUI lifecycle ([DUI], [SCREEN])

Always disable in production for a clean console.