Configuration — ns-adminmechanic
config.lua holds the language, the command and the permission. Finer values (distances, camera) are constants at
the top of client.lua. config.lua, locales/ and client.lua stay editable under Cfx escrow (escrow_ignore).
config.lua
Config.Locale = 'en' -- 'en' | 'tr' (add your own in locales/)
Config.Command = 'adminmechanic' -- chat command that opens the menu
Config.Permission = 'group.admin' -- ACE group, or a list of groups
| Option | Default | Meaning |
|---|---|---|
Config.Locale | 'en' | Menu language. An unknown code falls back to English with a console warning. |
Config.Command | 'adminmechanic' | The chat command. Set 'mekanik' to keep the command of the old ns-mekanik. |
Config.Permission | 'group.admin' | Who may use the command: one ACE group (e.g. 'group.mod') or a list ({ 'group.admin', 'group.mod' }). ox_lib checks it on the server; the client cannot open the menu on its own. |
Languages
locales/en.lua and locales/tr.lua hold every text the menu shows, including part names (mod_<slot>), wheel
types (wheeltype_<id>), window tints (tint_<id>), plate types (plate_<id>), paint finishes (finish_<id>) and
xenon colours (xenon_<id>). To add a language, copy en.lua to e.g. de.lua, change Locales['en'] to
Locales['de'], translate the values and set Config.Locale = 'de'. A key missing from your file shows the English
text.
Distances
client.lua:
| Constant | Default | Meaning |
|---|---|---|
NEARBY_RADIUS | 5.0 | How close (m) a vehicle must be to open the menu when you are not in one |
MAX_DISTANCE | 10.0 | A change made from further than this (m) from the car closes the menu instead |
CONTROL_TIMEOUT | 1000 | How long (ms) to wait for network control of the car |
Camera
| Constant | Default | Meaning |
|---|---|---|
CAM_FOV | 45.0 | Field of view |
CAM_EASE_MS | 500 | Time to move between camera presets |
CAM_PITCH_MIN / CAM_PITCH_MAX | -5.0 / 75.0 | How far down / up the camera can orbit |
DRAG_HEADING_SPEED / DRAG_PITCH_SPEED | 0.3 / 0.15 | Mouse drag sensitivity |
ZOOM_SPEED | 0.0015 | Mouse wheel sensitivity |
CAMERA_PRESETS holds the angle used for each part (front, rear, side, wheel, engine, trunk,
interior…): heading and pitch in degrees, distance as a multiple of the car's size (or meters for a fixed
distance), an optional look offset and the door to open (hood / trunk).
Menu parts
PERFORMANCE_MODSandBODY_MODS(client.lua) list the GTA mod slots in the menu with their camera preset. Remove a line to hide a part.WHEEL_TYPES,WINDOW_TINTS,PLATE_TYPES,PAINT_FINISHESandXENON_COLORSlist the choices in menu order; their labels come from the locale files.- The colour swatches of the editor are
COLOR_PRESETSat the top ofnui/app.js.
Paint finish
Paint finish is picked inside the primary / secondary colour editor. The colour is always written as a custom RGB colour on purpose: ox_lib only restores the paint type together with a custom colour, so this is what keeps the finish after the car is parked and taken out.