NullSect
Systems nominal

Docs / Admin Mechanic / Configuration

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
OptionDefaultMeaning
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:

ConstantDefaultMeaning
NEARBY_RADIUS5.0How close (m) a vehicle must be to open the menu when you are not in one
MAX_DISTANCE10.0A change made from further than this (m) from the car closes the menu instead
CONTROL_TIMEOUT1000How long (ms) to wait for network control of the car

Camera

ConstantDefaultMeaning
CAM_FOV45.0Field of view
CAM_EASE_MS500Time to move between camera presets
CAM_PITCH_MIN / CAM_PITCH_MAX-5.0 / 75.0How far down / up the camera can orbit
DRAG_HEADING_SPEED / DRAG_PITCH_SPEED0.3 / 0.15Mouse drag sensitivity
ZOOM_SPEED0.0015Mouse 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).

  • PERFORMANCE_MODS and BODY_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_FINISHES and XENON_COLORS list the choices in menu order; their labels come from the locale files.
  • The colour swatches of the editor are COLOR_PRESETS at the top of nui/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.

Cart

Your cart is empty.