Customization
Almost everything is in config.lua. The rest is text, data, and the thin layer that talks to your framework.
Which file decides what
Section titled “Which file decides what”| File | What it decides | Open to edit |
|---|---|---|
config.lua | Framework, language, who may paint, items, command names, paint-shop markers | Yes |
locales/*.lua | Every notification and chat suggestion, one file per language | Yes |
locales/main.lua | The function that picks the text for Config.Locale | Yes |
bridge/server.lua | Framework detection, notifications, admin check, jobs, usable items, removing items | Yes |
bridge/client.lua | Framework detection and notifications on the player’s side | Yes |
items/ox.lua, items/qb.lua, items/sql.sql | Ready-made item definitions to copy into your inventory | Yes |
permissions.json | The Steam IDs allowed to open the menu. Written by the give and remove commands | Yes |
vehicle_original_colors.json | Each painted car’s colour before it was first painted, by model and plate | Yes |
html/ui.html, html/style.css, html/script.js | The menu: its title, its swatches and its look | — |
data/, stream/ | The paint definitions and ramp textures for colours 223 to 242 | Leave as is |
client/main.lua, server/main.lua | The logic | Escrowed |
General
Section titled “General”| Option | What it does | Default |
|---|---|---|
Config.Framework | "auto", "esx" or "qbcore". Auto uses whichever of es_extended and qb-core is running; QBox counts as qb-core through its QBCore compatibility. Pinned, QBox uses "qbcore" | "auto" |
Config.Locale | The language of every message. See Languages, below | "es" |
Config.PermissionFile | The name of the JSON file that holds the permission list | "permissions.json" |
Who can open the menu
Section titled “Who can open the menu”| Option | What it does | Default |
|---|---|---|
Config.Permissions | Use the permission list in permissions.json | true |
Config.UseJobs | Let the jobs in Config.AuthorizedJobs open the menu too | true |
Config.AuthorizedJobs | The job names allowed when UseJobs is on | mechanic, police |
The two switches combine like this:
Permissions | UseJobs | Who can open the menu |
|---|---|---|
| on | on | Players on the list, and anyone whose job is in AuthorizedJobs |
| on | off | Only players on the list |
| off | on or off | Everybody |
The list is keyed by Steam identifier. A player who is not running Steam cannot be added; the give command answers that it could not get their Steam identifier.
| Option | What it does | Default |
|---|---|---|
Config.UseItems | Register the 82 paint items and the reset item as usable | true |
Config.ItemsRequirePermission | Make the paint items follow the same rules as the menu. Off, anybody holding one can use it | false |
The reset item never asks for permission. The item names, and where their definitions ship, are in Installation.
Commands
Section titled “Commands”Each name is set in config.lua, without the slash.
| Option | Default | Who | What it does |
|---|---|---|---|
Config.Chameleon | /chameleon | Anyone allowed by the rules above | Opens the menu. You must be in a vehicle |
Config.ChameleonReset | /chameleonreset | Anyone | Puts the car you are in back to its original colour |
Config.ChameleonGive | /chameleongive [ID] | Admins | Adds that player’s Steam ID to the permission list |
Config.ChameleonRemove | /chameleonremove [ID] | Admins | Takes it off again |
“Admin” means the admin or superadmin group on ESX, and the admin or god permission on QBCore. Both checks live in bridge/server.lua if yours are called something else.
Paint-shop markers
Section titled “Paint-shop markers”Config.Locations is a list; add as many entries as you like. Each one has:
| Field | What it does | Shipped value |
|---|---|---|
coords | Where the marker sits | Two example spots near Burton |
radius | How close, in metres, you must be for the prompt | 3.0 |
markerType | The FiveM marker drawn | 1 (a ring on the ground) |
markerColor | Red, green, blue and alpha | Red on one, green on the other, alpha 100 |
markerScale | Its size | 2.0 × 2.0 × 1.0 |
notification | The help text shown inside the radius | Press ~INPUT_CONTEXT~ to open the Chameleon menu |
The marker is drawn from 10 metres away. The prompt only appears inside radius and in a vehicle; E then opens the menu, with the same permission check as the command.
The notification text is in config.lua, not in the locales, so translate it there.
The menu
Section titled “The menu”html/ui.html holds the swatches — one per colour ID from 161 to 242 — and the menu’s title, “Chameleon Paintings”, which is written in the page rather than taken from the locales. html/style.css gives each swatch its preview colour.
Languages
Section titled “Languages”Nine ship in locales/: en, es, fr, de, it, pt, pl, ru and tr. Set Config.Locale to one of those codes.
To add one:
- Copy
locales/en.luato a new file, for examplelocales/nl.lua. - Change the language code at the top of the new file to
nland translate the text. - Add
locales/nl.luato both theclient_scriptsandserver_scriptslists infxmanifest.lua, next to the other locale files. - Set
Config.Locale = "nl", thenrefreshand restart the resource.
A missing key shows as Translation [key] does not exist rather than breaking anything, which makes a half-finished file easy to spot.
The bridge
Section titled “The bridge”Two files in bridge/ are the only places the resource touches your framework.
| File | What it does |
|---|---|
bridge/server.lua | Finds the framework, sends notifications (esx:showNotification or QBCore:Notify), decides who is an admin, reads a player’s job, registers the usable items and removes an item after use |
bridge/client.lua | Finds the framework on the player’s side and shows notifications (ESX.ShowNotification or QBCore.Functions.Notify) |
With no framework found, notifications fall back to chat messages.
Adapting it. To use your own notification script, replace the body of Bridge.Notify in both files. For a custom admin system, change Bridge.IsAdmin. For a framework that is not ESX, QBCore or QBox, fill in each Bridge. function in bridge/server.lua — framework detection, Notify, IsAdmin, GetPlayerJob, RegisterUsableItem and RemoveItem — and the resource needs nothing else.