Configuration

Configuration

All configuration for legends_platechanger is done in the config/config.lua file.

Configuration File

Location: config/config.lua

Config = {}
 
Config.Framework = 'auto'
Config.InteractionType = 'auto'
Config.Inventory = 'auto'
Config.RequireJob = false
Config.Job = "dmv"
Config.Item = "licenseplate"
Config.Lang = "en"
 
Config.EnableNPC = true
Config.NPCPrice = 5000
Config.NPCCoords = vector4(1188.85, 2640.11, 38.4, 84.99)
Config.NPCModel = "s_m_y_cop_01"
Config.NPCBlip = {
    enabled = true,
    sprite = 430,
    color = 3,
    scale = 0.8,
    name = "License Plate Shop"
}

Framework Settings

Config.Framework

Config.Framework = 'auto'

Description: Determines which framework to use for player data and money management.

Type: string

Default: 'auto'

Options:

ValueDescription
'auto'Automatically detects QBX-Core, QB-Core, or ESX
'qb'Force use QB-Core
'qbx'Force use QBX-Core
'esx'Force use ESX

The 'auto' setting checks in order: QBX-Core, QB-Core, then ESX. It uses the first one found.

Config.InteractionType

Config.InteractionType = 'auto'

Description: Determines which targeting system to use for NPC interaction.

Type: string

Default: 'auto'

Options:

ValueDescription
'auto'Automatically detects available target system
'ox_target'Force use ox_target
'ox_lib'Force use ox_lib's TextUI interaction
'qb-target'Force use qb-target

If no target system is detected, the resource falls back to ox_lib's TextUI with [E] key interaction.

Config.Inventory

Config.Inventory = 'auto'

Description: Determines which inventory system to use for item management.

Type: string

Default: 'auto'

Supported Systems:

  • ox_inventory
  • qb-inventory
  • esx_inventory

Job Restrictions

Config.RequireJob

Config.RequireJob = false

Description: When enabled, only players with the specified job can change license plates.

Type: boolean

Default: false

ValueBehavior
trueOnly whitelisted job can use the plate changer
falseAnyone with the item can change plates

Config.Job

Config.Job = "dmv"

Description: The job name required to use the plate changer (only applies when RequireJob = true).

Type: string

Default: "dmv"

Example Jobs:

  • "dmv" - Department of Motor Vehicles
  • "mechanic" - Mechanic job
  • "police" - Police department

Item Settings

Config.Item

Config.Item = "licenseplate"

Description: The item name that players use to change license plates.

Type: string

Default: "licenseplate"

⚠️

This must match the item name in your inventory system configuration.

Config.Lang

Config.Lang = "en"

Description: The language file to use for notifications and UI text.

Type: string

Default: "en"

The language files are located in locales/. To add a new language:

  1. Copy locales/en.json to a new file (e.g., locales/es.json)
  2. Translate all strings in the new file
  3. Set Config.Lang = "es"

NPC Settings

Config.EnableNPC

Config.EnableNPC = true

Description: Enables or disables the NPC that sells license plates.

Type: boolean

Default: true

ValueBehavior
trueNPC spawns at configured location
falseNo NPC, players must obtain items another way

Config.NPCPrice

Config.NPCPrice = 5000

Description: The price in dollars to purchase a license plate from the NPC.

Type: number

Default: 5000

Money is taken from the player's bank account, not cash.

Config.NPCCoords

Config.NPCCoords = vector4(1188.85, 2640.11, 38.4, 84.99)

Description: The spawn location and heading for the NPC.

Type: vector4 (x, y, z, heading)

Default: Sandy Shores area

Format: vector4(x, y, z, heading)

  • x, y, z - World coordinates
  • heading - Direction the NPC faces (0-360 degrees)

Config.NPCModel

Config.NPCModel = "s_m_y_cop_01"

Description: The ped model to use for the NPC.

Type: string

Default: "s_m_y_cop_01" (Police Officer)

Common Ped Models:

  • "s_m_y_cop_01" - Police Officer
  • "s_m_m_ciasec_01" - Security Guard
  • "a_m_y_business_01" - Businessman
  • "s_m_y_dockwork_01" - Dock Worker

For a full list of ped models, see the FiveM Ped Models Documentation (opens in a new tab).

Config.NPCBlip

Config.NPCBlip = {
    enabled = true,
    sprite = 430,
    color = 3,
    scale = 0.8,
    name = "License Plate Shop"
}

Description: Configuration for the map blip that marks the NPC location.

Type: table

PropertyTypeDescription
enabledbooleanShow blip on map
spritenumberBlip icon ID
colornumberBlip color ID
scalenumberBlip size (0.5 - 1.5 recommended)
namestringText shown on map hover

Common Blip Sprites:

  • 430 - Clipboard icon
  • 225 - License plate icon
  • 326 - Mechanic icon
  • 477 - DMV icon

For all blip sprites, see FiveM Blip Reference (opens in a new tab).


Example Configurations

Public Use (No Restrictions)

Config.Framework = 'auto'
Config.InteractionType = 'auto'
Config.Inventory = 'auto'
Config.RequireJob = false
Config.Item = "licenseplate"
 
Config.EnableNPC = true
Config.NPCPrice = 2500

DMV Job Only

Config.Framework = 'auto'
Config.RequireJob = true
Config.Job = "dmv"
 
Config.EnableNPC = true
Config.NPCPrice = 0  -- Free for DMV workers

Mechanic Shop Integration

Config.Framework = 'auto'
Config.RequireJob = true
Config.Job = "mechanic"
 
Config.EnableNPC = false  -- Disable NPC, use your own shop system
Config.Item = "licenseplate"

Need Help?

Join our Discord for support: discord.gg/lgnds (opens in a new tab)


Legends Store - Premium FiveM Scripts