Configuration — ns-mekanik
ns-mekanik has no config.lua. The few values an owner may want to change are constants at the top of
client.lua, and the permission is in server.lua.
Permission
server.lua:
lib.addCommand('mekanik', {
help = 'Mekanik menüsünü açar (tamir ve modifiye)',
restricted = 'group.admin',
}, ...)
Change restricted to another ACE group (e.g. 'group.mod') or a list of groups ({ 'group.admin', 'group.mod' }).
The check runs on the server; the client cannot open the menu on its own.
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 texts and parts
STRINGSholds every text the menu shows (Turkish by default). Translate the values to change the language.PERFORMANCE_MODSandBODY_MODSlist the GTA mod slots in the menu with their label and camera preset. Remove a line to hide a part.WHEEL_TYPES,WINDOW_TINTS,PLATE_TYPESandPAINT_FINISHEShold the choices and their labels.- 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.