Mechanic documentation
A complete mechanic job built around real hands-on work. Customers build their tuning on their own car and send it to a shop. The shop bills it and orders the parts. Mechanics then carry every part by hand and install it with the jack, the lift, the engine hoist, the sander and the paint gun.
Around that core there is:
billing and estimates;
a team with wages, stats, appointments and a vehicle history for every plate;
vehicle inspection (ITV), a dyno and wear by kilometres;
realistic damage, engine swaps and used engines;
nitro, hydraulics, ECU tuning and company vehicles.
Version 2.1.2
Requirements: FXServer build 35245+, OneSync (the manifest declares
/onesync),ox_libandoxmysql.Frameworks: QBCore · Qbox Legacy · ox_core · standalone ·
'custom'(see Compatibility)Languages: es · en
No lock-in: every other ROLO SCRIPT resource (rolo_notify, rolo_interface, rolo_services, rolo_admin...) is optional. Without them the script falls back to ox_lib, your framework's own systems or the base game, and it never errors because one is missing.
No tickets needed: everything you may want to adapt is in open files (see Escrow and Integrations / Custom).
What's new in 2.1.3
- Abandoned cars go to the depot: when a player leaves (disconnect or logout), their owned cars left out in the world wait 3 minutes for them (
Config.AbandonedVehicles). If the owner is not back, the car disappears and goes to the depot of your garage script (origen_garages with its own depot price, qb-garages withdepotPrice, qs-advancedgarages). Cars someone is driving, towed or with an open shop order keep waiting, and the owner is told on the next login. Your own garage:Compat.ImpoundVehicleincompat/server.lua.
What's new in 2.1.1 / 2.1.2
- Lighter while you work in the shop: the shop loops work out what is around 8 times a second and only read the keys every frame (tuning bays, tablet, crates, dealer lot, tools, lifts, work markers, prompts). Stance and neon effects only touch the wheels that need it and only while the car is on screen. The job is cached from the framework events instead of being read every 750 ms.
- Crates: when a part from a crate is installed, the crate is gone (it no longer drops on the floor and clips into or under the car).
- New rims: while the old wheels come off, the new wheels wait on the floor next to the car and the mechanic holds a wrench (
Config.Visuals.handTool, set it tofalsefor empty hands). 2.1.2: a wrench instead of the impact driver, which looked wrong in the hand. - Hydraulics toned down: a hydraulic kick instead of a jump (lower lift, hops, dance and a lower speed cap in
Config.Hydraulics).
What's new in 2.1.0
- Diagnostics panel (admin tablet > Diagnóstico, console command
rolo_mechanic_diag): checks your install and tells you how to fix it (see Diagnostics). - OBD-II scanner (
obd_scanneritem): 28 fault codes computed on the server from the car's real condition (see OBD scanner). It is also sold in the supplies shop (Almacén,Config.Supplies, $1,200 by default). - Part quality tiers + warranties: OEM / Aftermarket / Performance, with claims at the shop that fitted the part (see Part quality tiers + warranties).
Config.Warranty.enabled = falserestores the old behaviour. - Engine stays on when you get out (
Config.CarMenu.keepEngineOn = true): like a real car, leaving the driver seat keeps the engine running and a hint says to switch it off from the vehicle menu. Set it tofalsefor GTA's default, or if your keys / engine script already handles it. Config.AllowNegativeBalance(defaultfalse): every charge checks the balance first. Set it totrueon servers whose banking allows debt (for example Quasar).- Hardened economy: every amount is validated (no NaN, infinity, fractions or <= 0), invoices are paid atomically (no double payment), the shop fund pays out only when the bank operation succeeded, supply boxes are claimed before they are given, the dealer sells each car to one buyer only, and inspection / dyno results are clamped on the server.
- Common ROLO bridge (
bridge/core_server.lua,bridge/core_client.lua, open): one verified core for QBCore, Qbox, ESX Legacy, ox_core, standalone and'custom'. - Compatibility fixes: ESX duty uses
job.onDuty; Qbox offline job / money useqbx_coreexports and usable items useCreateUseableItem; the ox usable-item export is always registered; ps-dispatch alert fields; lb-phone sends real mail. - Performance: marker, lift, ECU, off-road and dealer loops are gated or slower, menus close on death, the resource cleans up on stop, the tablet clock runs only while visible.
- Upgrading from 2.0.x: tables are created and upgraded by themselves (
mech_memberships,mech_settings,mech_obd_reports,mech_warranties; also ininstall.sql). Add theobd_scanneritem (items/). New config keys to merge:Config.AllowNegativeBalance,Config.ServicesBonusCooldown,Config.Obd,Config.Warranty,Config.CarMenu.keepEngineOn, and theobd_scannerline ofConfig.Supplies.
Features
Tuning orders
- The customer parks at the shop and opens the tuning panel. Every change shows on the car right away, with a free camera.
- Parts come with their own illustrations, prices, a cart and order tracking.
- Available options:
- paint (primary, secondary, pearl, rims, interior and dashboard);
- rims and tyre smoke;
- xenon, neons, tint and plates;
- engine, brakes, gearbox, suspension, armour and turbo;
- stance (height, camber, width, rim size, tyre width), per axle or per wheel (camber and width of each wheel);
- extras 1-20 and tyre compound;
- lowrider hydraulics: raise the front, rear or a side, one corner (3 wheels), front hop, whole-car bounce and dance mode (NUMPAD 8/2/4/6, 5, 9, 0; height PAGEUP/PAGEDOWN). GTA lowriders use the game's own per-wheel hydraulics; any other car uses real physics. Synced for everyone;
- anti-lag, two-step and nitro;
- manual gearbox (
Config.Gearbox): the driver picks auto / manual per car (/cajaor a key). In manual the game never shifts by itself: LSHIFT / LCTRL shift up / down, shifts are instant, a gear too high for the speed pulls less and pulling away in 3rd or higher can stall the engine. Reverse works as always. rolo_interface shows the gear as M3.
- Two ways to pay (
Config.OrderPayment):'invoice': the shop sends the invoice when it accepts the order. While it waits for the payment, the order has Send invoice again (the customer gets the pay window again, or a message if offline) and Void and bill again (back to "New" to send a new invoice, e.g. with another discount), besides cancelling;'upfront': the money is held and refunded if the shop rejects the order. An order already in progress (only the boss can cancel it) refunds only the parts not installed yet: the installed ones stay on the car and are paid (they go to the shop's fund, minus the commissions already paid). The customer is told how much was charged.
- Self-service (optional, OFF by default): when no mechanic is on duty, the customer can pay a surcharge and get the changes applied instantly (
Config.SelfService, also in Ajustes). With it off, the customer places a normal order and a mechanic installs it. - Admin tuning (
/tuningadmin): free, instant tuning on the car you are driving.
Hands-on work (all synced for everyone around)
- Parts are delivered in crates to the shop (
Config.DeliveryFeePercent, 10% by default). Optional: pick them up at the docks warehouse with a vehicle (Config.Warehouse.enabled, off by default). - On-screen work checklist (
Config.WorkChecklist): next to a car with an order, a panel on the right lists every part with its state (installed, in progress with its steps and a bar, in hand, at delivery, ordered, not ordered) and the next thing to do nearby. When everything is installed it says the order is ready to bill. It hides in cars, with the tablet or the tuning menu open, and when you walk away. - Restart one part: if a step went wrong or the game crashed halfway, Restart on that part in the tablet's order sends its crate back to the delivery point and starts its steps from zero. The car goes back to how it is saved (wheels, hood, paint) and the rest of the order doesn't change. An engine swap that already took the old engine out doesn't store it twice.
- One tool at a time: while the car is on the jacks / lift only the jobs that need it are shown, and while the engine hoist stands in front only the engine and body jobs. When those jobs are done, the tool must come off first (the prompt says what comes next, e.g. Lower the jacks (next: Engine)), and it goes back on for the next job that needs it. The hoist can't be placed on a raised car, and a car with the hoist in front can't be raised.
- Several tuning bays, each with its own parts delivery point: every order remembers the bay where the car was, and its crates arrive at that bay's delivery point. Two or more mechanics can work at once without mixing parts. Each crate shows the part, the order, the bay and the plate.
/talleradminlists every bay with its delivery point and won't save a bay without one; pickups can be unloaded at any delivery point. - Every part is carried by its size:
- small boxes;
- bumpers and hoods on the shoulder;
- wheels held upright in both hands (it can also be rolled beside you: see the
wheelcarry profile); - engines on a pallet truck.
- Jack for the wheels and lift for the underside (no lift in the shop = the jack does everything).
- Default lift: GTA's four-post lift (The Chop Shop DLC, build 3095+), with its "up" model so the platform is under the raised car. Older builds automatically get the two-post lift (
Config.LiftFallbackModel, build 2372+). Nothing to install. - A lift of your map / MLO: mark it as
nonein/talleradminand no prop is placed. - Two-piece lifts from another resource you own (body + arms that rise with the car):
LiftModel+LiftArmsModel.
- Default lift: GTA's four-post lift (The Chop Shop DLC, build 3095+), with its "up" model so the platform is under the raised car. Older builds automatically get the two-post lift (
- The jack fits itself: the car goes up until it rests on top of the jack (
Config.JackAutoFit), never more thanConfig.JackMaxHeight(0.8 m). Default jacks: the big blue jack (prop_carjack), with the small red floor jack (imp_prop_car_jack_01a, useJackMaxHeight = 0.4with it) and the axle stand as fallbacks (Config.JackModeltakes a list). The jacks always stand on the floor (MLO floors too) and the car rests on their real top (found with a ray, so a long handle doesn't count). - Wheels come off and on with an impact wrench and its sound. The old wheel lies flat on the floor beside the car (away from the mechanic) until the new one goes on. Wheel parts go wheel by wheel: brakes on the 2 front wheels, suspension, ceramic brakes, drift tyres and stance on all 4 (
stepsinConfig.Mods). - Tuning preview opens what you look at: trunk parts (trunk, speakers) open the trunk and hood parts (hood, turbo, engine) open the hood while you browse them.
- New rims, wheel by wheel (
Config.RimsOneByOne): first "Remove old wheel (1/4...4/4)", each old wheel comes off and stays on the floor; then "Fit new wheel (1/4...4/4)", each new wheel appears with the new rims, while the ones still to do stay off. At the end the old wheels are taken away. The car can't be lowered from the jack with wheels missing (if the order is cancelled, the old wheels go back on). GTA has one rim model for the whole car, so an old and a new rim can never show at the same time: that's why the old ones come off first. - The hood comes off and rests against the car.
- Under-car work on a creeper with a torch when the car is on the jack, or standing under it, arms up, when it is up on the lift. Interior work is done sitting in the seat.
- Every work animation is kept alive during the progress bar (another script can't cut it), with a fallback animation if one can't load.
- Engine swaps with the engine hoist: smooth movement, a chain and some sway.
- Free colour + chameleon paints in the tuning menu (primary / secondary):
- Libre: any colour with our own picker (hue, saturation, brightness or a
#hexcode), shown live on the car (Config.PaintRGB). - Camaleón (
Config.Chameleon, off by default): chameleon paints are not in the base game on PC, so your server must stream a chameleon add-on (carcols + textures). On game build 2612+ its ids start at 223. Set the ids of your add-on in the config. Picked on the primary colour, it goes on the secondary too.
- Libre: any colour with our own picker (hue, saturation, brightness or a
- Paint:
- sanding side by side;
- a real spray gun (base-game
prop_spraygun_01, spray cans as a fallback) with a mist in the paint's own colour. Its position in the hand is inConfig.Visuals.paintGunAttach; - the colour builds up gradually over the primer.
- Welding sparks for body work and the tank; windows are fitted and polished with a cloth (repair
anim = 'glass', welding if that scenario doesn't start).'hammer'is still available inConfig.Repairs. - An OBD laptop with a cable for diagnosis.
- Workshop sounds: impact wrench, ratchet, grinder, compressor, spray, welding and hoist.
- An optional cinematic camera that each player turns on with
/mechcam. - Optional install minigames (skill checks) for every part. The minigame comes first: pass it and the animation and progress bar start; fail it and nothing is lost (the part stays in your hands), and that step keeps its minigame until you pass it (pressing E again can't skip it).
- Placing props shows every key in the bubble: [E] Place · [WHEEL] / arrows rotate · [BACKSPACE] Cancel.
Service and billing
- Diagnosis of the nearest car, repairs with items, and suggested repairs turned into an invoice in one click.
- Car menu (
Config.CarMenu, key Q by default,/coche): inside a vehicle, a panel to control the car while you keep driving:- engine on / off;
- every door, hood and trunk on a top-down drawing of the car;
- windows one by one or all;
- change seat;
- headlights, interior light, indicators, hazards, neons and the convertible roof;
- the car's state: fuel, engine, body, km, the manual gearbox mode and nitro.
- The driver controls everything; passengers only their own seat, window and door.
- Engine stays on when the driver gets out (
keepEngineOn, default on): switch it off with the engine button.false= GTA's default. - Each player can change the key in Settings > Key Bindings > FiveM. GTA's radio wheel (also Q) is turned off inside cars (
disableRadioWheel).
- Shop memberships (
Config.Memberships, tablet > Socios): sell a Basic / Premium membership to a nearby customer with an invoice. Once paid, the customer is a member of that shop for 30 days: the discount is already applied to every price in the tuning menu (which shows "Socio Premium: -20%") and to the shop's invoices. Paying again extends it; the boss can cancel it. - Duct tape (
duct_tape,Config.Care.tapeItem): anyone can patch a broken-down car on the road, enough to limp to a shop (engine and body up to 45%, no smoke or oil leak). Tyres and broken wheels still need a mechanic. - Invoices and estimates:
- discounts per grade, tax and late fees;
- partial payments, bank or cash, and tips;
- reminders and the
/facturascommand.
- Supplies shop, delivered in a crate to the shop.
- Used engines: price them, rebuild them on the engine bench (4 minigames) or sell them for scrap.
Team and shop
- Team: hire nearby players, fire, change grades, see who is on duty and each mechanic's stats (installs, repairs, invoices, earnings, duty time).
- Wages per grade, paid from the shop fund every X minutes on duty.
- Fund in the bank (optional):
Config.FundAccount = 'society'keeps the shop's money in its job's business account of your bank script (qb-banking, Renewed-Banking, qs-banking, okokBanking, qb-management). Deposits / withdrawals made in the bank show up in the tablet within 30 s. Move the old fund to the bank before switching. - Stats: income and expenses per day, best-selling parts, transactions by type and a mechanic ranking.
- Appointments: customers book with
/cita. The shop confirms, marks them done or no-show, or cancels them. Customers get reminders by notification and phone. - Vehicle history per plate: tuning, repairs, maintenance, inspections and dyno runs, with km and mechanic. Customers see the history of their own cars.
- Duty time clock with an ID card swipe.
- Company vehicles with a deposit:
- tow truck with a flatbed that loads cars;
- hook tow trucks: GTA's hook grabs the car when you back into it, and the driver releases it with [G] (
Config.TowTrucks, rebindable);- van and forklift;
- rescue helicopter from the helipad.
- Placeable props (cones, lights, tools...).
Vehicle life
- Wear by km for:
- oil, spark plugs, air filter and coolant;
- catalytic converter, brake pads and brake fluid;
- tyres, suspension, clutch and gearbox oil;
- the EV battery (electric cars only get electric parts).
- Every worn part has an effect: misfires, less power, weak brakes, slow gear changes, overheating, flat battery.
- Realistic damage:
- brake heat and fade;
- part theft (
Config.PartTheft):- the lug wrench takes a wheel off a parked car, the pipe cutter its catalytic converter; the thief keeps the part;
- the car keeps the damage until a mechanic fixes it: the wheel is off for everyone, the catalytic is at 0% (less power);
- police alert with origen_police, ps-dispatch, cd, qs, core, rcore or plain notifications;
- cooldowns per car and player, minimum police, and your own cars are safe;
- mud, sand and off-road (
Config.Offroad):- street cars lose power on loose ground (mud, sand, marsh, snow) and get dirty;
- spinning the wheels almost stopped on deep ground gets them stuck (they sink a little);
- off-road cars and the new Todoterreno (A/T) tyre compound cope and never get stuck;
- tow rope (
/cuerda, or an item): your car pulls the other one out. It's seen by everyone and snaps when they get too far apart; /mechsurface(admins only) prints the ground under each wheel, to add surfaces;
- real crashes (
Config.RealDamage.crash,Config.Damage):- a hard hit hurts the engine and the body on top of GTA's damage, and shakes the camera;
- it can burst a tyre and, very hard, break a wheel off. The wheel is synced for everyone and comes back with the Llantas repair or any full repair;
- a damaged engine pulls less;
- oil leaks that leave a trail;
- engine fires;
- pushing broken-down cars.
- Maintenance reminders when the owner joins, by notification and phone mail.
- Mileage counter while driving.
Inspection, dyno and handling
- Inspection (ITV) from the tablet. It checks:
- engine, body and tank;
- tyres, windows and lights;
- fake plates and worn parts.
- A car that passes gets a certificate valid for X days, plus an optional item for the owner.
- Police check it with
/revisaritv [plate]. - OBD scanner (
obd_scanneritem): reads the car's fault codes (see OBD scanner below). - Dyno point: power, torque, top speed, 0-100 and a power curve, compared with the car's last run.
- Dyno bay: in
/talleradminchoose With a dyno (a cooling fan in front and a tool chest with a monitor, base-game props set inConfig.Dyno.furniture; GTA has no dyno model, so add your own streamed one there if you have it) or Point only (the dyno of your map / MLO). - Mark the point sitting in a car, where the dyno is, facing forward.
- The mechanic drives a car on and presses E: the car centres itself on the rollers (
snap), stays still, its drive wheels spin with the revs (front, rear or all, from the handling), and a side camera shows the car during the run (camera).
- Dyno bay: in
- Handling editor for admins: live sliders on the car you drive. Saving applies the handling to every car of that model.
Used cars (compraventa)
- The shop buys cars from players at its used-car point: the owner parks it there and gets an offer to accept or reject. The fund pays.
- Scrapyard: cheap broken cars, high mileage and worn parts, refreshed every hour.
- Refurbish: drive a stock car to the order bay. It becomes an internal order that no customer pays. The fund pays the parts (and the commissions, if enabled). Parts, labour, used engines and repair items all add up as the car's investment.
- Sell on the lot: a "SE VENDE" sign over the car shows:
- price, mileage and condition;
- upgrades, inspection and dyno results.
- The "[E]" prompt sits between you and the car, and the sign rises as you come close, so they never overlap.
- A purchase sheet for the customer:
- full vehicle history;
- test drive with a deposit;
- financing (down payment, installments, interest; unpaid cars are repossessed);
- trade-in of the buyer's own car.
- Stock with purchase price, investment, suggested price and margin per car. Sales commission for the staff member next to the car. Every movement goes into the shop fund, the stats and the history.
- Customers see their loans in
/facturasand can pay an installment early or pay off the rest.
Integration (all detected automatically; each one has a 'custom' option, see Integrations / Custom)
- Notifications, "[E]" texts and progress bars go through rolo_notify when it runs (optional). You can also use ox_lib, qb-core, okok or your own.
- Target: ox_target, qb-target, a key prompt or your own.
- Inventories: ox_inventory, origen_inventory, qs-inventory, codem-inventory, core_inventory, qb-inventory (and ps / lj / tgiann through QBCore), ESX.
- Vehicle keys, fuel, garages and bank / business accounts: see Compatibility.
- Phone mail: qs-smartphone (and Pro), lb-phone or your own.
- Police alerts for part theft: origen_police, ps-dispatch, cd_dispatch, qs-dispatch, core_dispatch, rcore_dispatch, or officers on duty get a notification and a blip.
- A Discord webhook per category: orders, billing, staff, parts, vehicles, used cars, admin.
Installation
- Put
rolo_mechanicin your resources folder. Your framework,ox_libandoxmysqlmust start before it. FXServer build 35245+ and OneSync are required. - Add
ensure rolo_mechanicto yourserver.cfg. - Items (
items/folder, all 23 items of the script, Spanish labels ready to change):qb_items.luafor qb-core / qs-inventory / Qbox;ox_origen_items.luafor ox_inventory / origen_inventory (read the comment at the top: origen doesn't use theserver = { export }lines);- Images for every item (23 PNG, transparent):
items/images/*.png. Copy them into your inventory's images folder. If you already have an image for an item, keep yours. The optional inspection certificate item (Config.Inspection.certificateItem) is up to you.
- Set your mechanic jobs in
Config.Jobs. Admins areConfig.AdminPermissions(framework groups / aces). - The database tables are created and upgraded automatically on start.
install.sqlis only for database users that can't create tables. - In game, run
/talleradminto create a shop and mark its points:- required: tuning bay 1 and its delivery point (they are listed as a pair);
- extra tuning bays (up to 5), listed as pairs too (Tuning bay 2 + Delivery of bay 2...): after marking one, you mark its own delivery point right away (or later with Mark delivery). Every bay needs its delivery point before the shop can be saved;
- optional: tablet, paint booth, garage, time clock, engine bench, dyno, helipad, used cars and lifts.
Commands
| Command | Who | What it does |
|---|---|---|
/taller (or the mechanic_tablet item) |
Mechanics | Shop tablet |
/talleradmin |
Admins | Create / edit shops |
/tuningadmin |
Admins | Free instant tuning on your car |
/handlingeditor |
Admins | Handling editor for the model you drive |
/facturas |
Everyone | Your invoices |
/cita |
Everyone | Book an appointment |
/revisaritv [plate] |
Police + mechanics | Check a car's inspection |
/mechcam |
Everyone | Cinematic workshop camera on / off |
/hidraulica |
Drivers of a car with hydraulics | Show / hide the hydraulics controls |
Every command can be renamed in config.lua. Some Spanish help texts mention /talleradmin and /facturas; if you rename those commands, edit the texts in the locales too.
Lowrider hydraulics
The "Hidráulica" part (tuning menu > Rines) is installed like any other part: the customer orders it, the shop brings the part, the mechanic raises the car and fits it from underneath. It is saved on the car (garage and restarts keep it). There is no menu to turn it on: the driver of a car with hydraulics uses the keys.
| Key (default) | What it does |
|---|---|
| NUMPAD 8 / 2 (hold) | Raise the front / the rear |
| NUMPAD 4 / 6 (hold) | Tilt left / right |
| Two at once (8 + 4, 8 + 6...) | Only that corner goes up (3 wheels on the floor) |
| NUMPAD 5 | Front hop: the front wheels jump and land |
| NUMPAD 9 | Whole car bounce |
| NUMPAD 0 | Dance mode on / off (it bounces by itself to the beat) |
| PAGE UP / PAGE DOWN | Body height (also while driving) |
- Tricks work with the car stopped or almost stopped (
maxSpeed). It never tilts more thanmaxTiltdegrees. - GTA lowriders (Benny's: Chino, Buccaneer, Voodoo, Faction, Moonbeam, Tornado Custom...) use the game's own hydraulics wheel by wheel. Any other car uses real physics: the side is pushed up and held, and when you let go the car falls with its own weight and bounces. Everyone sees it.
- Controls on screen: when you get in a car with hydraulics they show for a few seconds (rolo_notify key hints, with the player's own keys if they changed them).
/hidraulicashows them again. Without rolo_notify they come as a notification. - Players change the keys in Settings > Key Bindings > FiveM ("Hidráulica").
- Everything is in
Config.Hydraulics: keys, height range,lift/liftGain/liftMax(how high and how hard the sides go up),frontHop,hop,dance,hints. The physics values are a starting point: tune them in game to your taste.
Stance and rims
Stance (tuning menu > Rines > Stance) has sliders for height, front / rear camber, front / rear width, rim size (diameter) and tyre width. GTA only resizes tuning rims: a car on its factory rims needs other rims first (the menu says so). Limits in Config.Stance.
Grouped parts (xenon, tyre smoke, neons, paint, rims) are paid once for the whole job. Their price shows in the part's header and on the on / off rows.
Coming from rolo_mechanic v1
Shops, orders, invoices, engines and vehicle data are kept. The new tables and columns are added on the first start. Stop the old resource and start this one with the same name.
OBD scanner (Config.Obd)
Add the obd_scanner item (definitions and the image are in items/) and give it to your players or sell it in a shop. Use it next to a vehicle, or sitting in one: a progress bar runs and a panel with the car's fault codes opens.
- The server builds the report. It reads the wear of every part (the script's own wear system), the engine / body / fuel tank health from the car itself, the mileage and the last hard crash. The player's game only says which car it is next to, so a hacked client cannot invent codes. The same car in the same state always gives the same codes, and a code goes away by itself when the part is repaired.
- Codes: 28 OBD-II style codes (P = engine / fuel / gearbox / battery, C = brakes / suspension / tyres, B = body / impact, U = lost communication), each with a severity (info, warning, critical), the part, a readable title and the recommended repair, in English and Spanish (
L.obd_codesin the locales). The table with the thresholds isConfig.Obd.codes: change a number or add your own codes. - Mechanics get the full report (readings, parts to buy, recommended repair, engine / body / tank health, mileage). Everybody else gets a basic report (code, severity, system) unless you set
basicForOthers = false.requireJob = truelimits the item to mechanics. - Attach to order: a mechanic presses Adjuntar al pedido on the panel and the report is saved (
mech_obd_reports, created by itself), written in the car's history, shown in the shop's order view and in the vehicle history, and the owner gets a message and can read it in Mis vehículos (the vehicle history). - Anti-abuse: the server checks the item in the inventory, the distance to the car (measured on the server), the cooldown per player and per plate, a rate limit and that the scan really took its time.
- Any inventory works (ox, qb, origen, qs, ESX... through the compat core). For ox_inventory keep the
server = { export = 'rolo_mechanic.obd_scanner' }line of the item.
Part quality tiers + warranties (Config.Warranty)
When a mechanic fits a new maintenance part (tablet > Servicio > Mantenimiento) he picks a quality tier for it: OEM (original), Alternativa (cheaper, wears faster, short warranty) or Rendimiento (dearer, lasts longer). Every number is in Config.Warranty.tiers (priceMult, wearMult, days, km) and every part has its own base price in Config.Wear.parts.
- Order -> install -> warranty. The tablet only sends the tier key. The server works out the price (
price x priceMult), checks the car is next to the mechanic and that he works at that shop, takes the part item, resets the wear, invoices the owner (/facturas, the line shows the tier and the warranty) and writes a row inmech_warranties(created by itself; also ininstall.sql). From then on that part wears at the tier'swearMult(remembered per car + part until a new part is fitted). Parts fitted before this feature count asoem. - Claim. The owner brings the car; a mechanic of the shop that fitted the part opens Garantías, the car next to him is read and each warranty shows if it can be claimed and why not. A claim is valid when the warranty is active (not expired by days or km, not void) and the part has
failThreshold% or less left or the OBD codes (Config.Obd) rate it critical. The server closes the warranty with one atomicUPDATE ... WHERE status = 'active'before any money moves, so a double click or two mechanics can never claim it twice; thenrefundMode = 'repair'fits a new part for free (the shop fund paysConfig.PartsCostPercentof what the owner paid) or'refund'gives the owner back what they paid (fund -> bank). If the bank or the fund refuses, everything is rolled back. - Only paid money counts. The refund / parts cost is worked out from what was really paid on the invoice; a warranty whose invoice was cancelled without payment is void.
- Void. A part fitted by another shop voids the older warranty of that part (
voidIfServicedElsewhere). Expired / void sweeps run on start and everysweepMinutes. - Where players see it. Mechanic: Mantenimiento (tier select + price preview) and Garantías (claim). Owner: Mis garantías and the invoice. The OBD report shows "In warranty until ..." on the matching part.
- Turn it off.
Config.Warranty.enabled = false(or delete the block): parts are fitted free exactly as before, nothing else changes.billParts = falsekeeps tiers and warranties but no invoice. - Tiers with
days = 0orkm = 0carry no warranty (they still change price and wear).
Integrations / Custom
Everything you may want to adapt is in open files (config.lua, locales/, bridge/, compat/): you never need to open the escrowed code.
Hooks (bridge/server.lua > Bridge.WarrantyHooks): plain functions you can edit. They run protected: an error in your code is printed and ignored, the default answer is used.
Bridge.WarrantyHooks = {
-- return false, 'text' to refuse a claim (VIP only, blacklist, cooldown...)
canClaim = function(src, warranty, ctx) return true end,
-- return a whole number to charge another price (events, discounts...); nil keeps the config price
adjustPrice = function(ctx, price) return nil end,
onCreated = function(warranty) end, -- a part was fitted: warranty started
onClaimed = function(src, warranty, result) end, -- result = { mode = 'repair' | 'refund', amount, mechanic, shopId }
}
Events (server) for other scripts (Discord logs, phone mails, stats...):
AddEventHandler('rolo_mechanic:warrantyCreated', function(warranty) end)
AddEventHandler('rolo_mechanic:warrantyClaimed', function(warranty, result) end)
-- warranty = { id, plate, part, partLabel, tier, shopId, ownerCid, price, installedAt, expiresAt, kmAtInstall, kmLimit, status }
Exports (server):
exports.rolo_mechanic:GetWarranties(plate, onlyActive) -- list of warranties of a car (newest first)
exports.rolo_mechanic:GetActiveWarranty(plate, part) -- the active warranty of one part, or nil
exports.rolo_mechanic:GetPartTier(plate, part) -- 'oem' | 'aftermarket' | 'performance' | your own tier key
Server item exports. Every usable item the script registers (mechanic_tablet, fake_plate, obd_scanner, the care / theft items and so on) also gets a server export named after the item, so ox_inventory items can use server = { export = 'rolo_mechanic.<item>' } (see items/ox_origen_items.lua). The two items that open a client action also have client exports: rolo_mechanic.mechanic_tablet and rolo_mechanic.fake_plate. If you rename an item in Config, rename it in your item definition too.
Other exports (server ServicesCanManage, ServicesCharge, ServicesCredit: the free rolo_services resource uses them for the shop fund; client GetDriveInfo(): { km, nitro, warnings } of the car you drive, for HUDs such as rolo_interface):
exports.rolo_mechanic:ServicesCharge(shopId, amount, 'reason') -- takes from the shop fund; false when it can't
exports.rolo_mechanic:ServicesCredit(shopId, amount, 'reason') -- adds to the shop fund
local info = exports.rolo_mechanic:GetDriveInfo() -- client
Where to plug in your own system ('custom')
Set the option in config.lua to 'custom' and fill the matching function in the open file. Nothing needs the escrowed code.
| System | config.lua |
Open file and hook |
|---|---|---|
| Framework (identity, money, jobs, duty, admin check) | Config.Framework = 'custom' |
RoloBridge.Custom in bridge/core_server.lua: char, sourceOf, getMoney, addMoney, removeMoney, setJob, setDuty, isAdmin. Client side: RoloBridge.Custom.playerData in bridge/core_client.lua. Players: Bridge.GetPlayer / Bridge.GetPlayerByCid in bridge/server.lua (return a player shaped like WrapEsx) |
| Notifications, "[E]" texts, progress bars | Config.Notify / TextUI / Progress = 'custom' |
RoloBridge.Custom.notify, showText, hideText, progress (bridge/core_client.lua, documented at the top of bridge/client.lua) |
| Target | Config.Target = 'custom' |
Bridge.AddGlobalVehicle, RemoveGlobalVehicle, AddZone, RemoveZone in bridge/client.lua |
| Inventory | Config.Inventory = 'custom' |
Compat.CustomInventory (count, add, remove, canCarry) in compat/server.lua |
| Garages (owned cars) | Config.GarageSystem = 'custom' |
the custom entry of Compat.GarageSystems in compat/server.lua |
| Depot for abandoned cars | Config.AbandonedVehicles |
the 'custom' branch of Compat.ImpoundVehicle(plate, owner, rawPlate) in compat/server.lua |
| Bank / business account | Config.Society = 'custom' |
Compat.CustomSociety (balance, add, remove) in compat/server.lua |
| Vehicle keys | Config.VehicleKeys = 'custom' |
Compat.CustomKeys (give, remove) in compat/client.lua |
| Fuel | Config.Fuel = 'custom' |
Compat.CustomFuel (set, get) in compat/client.lua |
| Phone mail | Config.Phone = 'custom' |
Bridge.PhoneMail in bridge/server.lua |
| Police alerts (part theft) | Config.PartTheft.police.system = 'custom' |
Bridge.PoliceAlert in bridge/server.lua (server) and the rolo_mechanic:client:dispatch handler in bridge/client.lua (dispatch scripts that need the client) |
| Discord logs | config_server.lua |
Bridge.Log(category, title, description) in bridge/server.lua |
| Warranty rules | Config.Warranty |
Bridge.WarrantyHooks (above) |
| Usable items | Bridge.RegisterUsable(item, cb) in bridge/server.lua |
|
| Items, images, texts, prices, rules | items/, locales/, config.lua |
Examples:
-- bridge/client.lua (Config.Notify = 'custom')
RoloBridge.Custom.notify = function(message, kind, duration)
exports['my_notify']:Send(message, kind, duration)
end
-- bridge/server.lua (Config.Framework = 'custom')
RoloBridge.Custom.getMoney = function(src, account) return MyFramework.GetMoney(src, account) end
RoloBridge.Custom.removeMoney = function(src, account, amount, reason) return MyFramework.Remove(src, account, amount, reason) == true end
-- compat/client.lua (Config.VehicleKeys = 'custom')
Compat.CustomKeys = { give = function(vehicle, plate) exports['my_keys']:Give(plate) end, remove = function(vehicle, plate) exports['my_keys']:Remove(plate) end }
Every function follows the same rule: return the success value, or false / nil plus a reason. Amounts are whole numbers >= 1 by the time they reach your code. Anything you leave empty answers "not supported" and the script keeps working without that part.
Diagnostics (tablet > admin > Diagnóstico)
Shows what the script detected on your server and what is broken, so most setup problems can be fixed without a support ticket.
- It runs once about 10 seconds after the resource starts and prints only the warnings and failures to the server console (run it again from the console with
rolo_mechanic_diag). - Admins open it in the tablet (
/talleradmin> Diagnóstico): checks are grouped by area with OK / warning / failed badges, what was found and how to fix it. Copy report gives you a text to paste in a support ticket. - Checks: framework and versions, required resources (oxmysql, ox_lib), optional ROLO SCRIPT integrations (rolo_notify, rolo_services, rolo_interface, rolo_admin: never required), inventory / garages / business account / keys / fuel / target / notifications, OneSync, FXServer build, database tables, the items and jobs this script uses, and webhooks (only set / empty / placeholder is shown, never the value).
- The checks live in
diag/server.lua(open file). Items it does not find in a custom inventory list are reported as "not checked".
In-game settings (tablet > admin > Ajustes)
Admins (/talleradmin) can change about 25 settings without touching config.lua: economy (parts cost, commission, delivery fee and time, tax, memberships, dock pickup), damage (crash multipliers, real crashes, wheel breaking, brake heat, wear and its speed), driving (mud / sand, getting stuck, manual gearbox stall, hydraulics jump) and part theft (on / off, police needed, alert chance).
- They are saved in the
mech_settingstable and apply at once on the server and every client. - Each one shows its
config.luadefault and can go back to it with one click. The few marked "requires restart" take effect afterrestart rolo_mechanic. - The list lives in
shared/settings.lua.
Configuration (config.lua)
| Option | What it does |
|---|---|
Config.Framework, Inventory, VehicleKeys, Fuel, Phone, Society, GarageSystem |
'auto' detects them; set one to force it, or 'custom' for your own system (open bridge/ / compat/ files, see Integrations / Custom). |
Config.Notify, TextUI, Progress, Target |
'auto' uses rolo_notify / your target when they run. Also 'rolo_notify', 'ox_lib', 'qbcore', 'esx' ('okok' for Notify, 'kit' for TextUI), or 'custom' = your own (bridge/client.lua). |
Config.Jobs, RequireDuty, OffDutyOnLogin |
Mechanic jobs and duty rules. |
Config.OrderPayment, PayAccount, PayoutAccount, PartsCostPercent, CommissionPercent |
How orders are paid and how the money is shared. PayAccount = account every charge is taken from; PayoutAccount = account wages, commissions, tips, withdrawals, refunds and car sales are paid into (both 'bank' by default). |
Config.Durations |
Progress bar lengths (ms) of the flatbed load / unload, nitro refill and supplies box. |
Config.AllowNegativeBalance |
false (default): a charge needs the money to be there. true for banking scripts that allow debt (Quasar...). |
Config.FundAccount, Society |
Shop fund in this script's own table ('own') or in your bank script ('society'). |
Config.Services, ServicesBonusCooldown |
Optional link to the free rolo_services resource (government bonus per paid job). false = never connect. |
Config.SelfService |
Optional instant tuning when no mechanic is on duty (surcharge). Off by default: set enabled = true (or switch it on in Ajustes) to use it. |
Config.Billing |
Invoices, estimates, discounts per grade, tax, late fees. |
Config.Wages, Appointments, History, MaintenanceReminders |
Team and customer features. History.days (7): how long paid / cancelled invoices stay in "my invoices" and the window of the shop dashboard's weekly numbers. |
Config.Obd |
OBD scanner: item, who can use it, scan time, distance, cooldowns and the table of fault codes. |
Config.Warranty |
Part quality tiers (price, wear, days, km), claims (failThreshold, refundMode, refundAccount, claimAtIssuingShopOnly, voidIfServicedElsewhere) and sweeps. |
Config.CarMenu |
Car menu key / command, passengers, radio wheel, keepEngineOn (engine stays on when you get out). |
Config.Inspection, Dyno, HandlingEditor |
ITV rules (cooldownSeconds: time before the same plate can be inspected again), dyno numbers + bay (snap, spinning wheels, camera, furniture pieces), editable handling fields. |
Config.Supplies, Repairs, Care |
Items, repair costs and times. |
Config.CompanyVehicles, Flatbeds, TowTrucks, PlaceableProps, MechPropModels |
Company fleet, flatbed loading, hook tow trucks (release key), props, and the models /mechprop can name. |
Config.LiftModel, LiftModelUp, LiftArmsModel, LiftFallbackModel, JackModel, HoistModel and the lift / jack sizes |
Props and how cars sit on them. JackAutoFit / JackMaxHeight: the car rests on top of the jack. |
Config.WheelsNeedJack, RimsOneByOne |
Wheel work on the jack; new rims wheel by wheel (enabled, removeTime per old wheel). |
Config.InstallMinigame, Visuals |
Minigames (chance = 1.0 = every step; a failed step asks again), carry profiles (model, bone, position, rotation, animation of each carried part), sounds, creeper, torch, paint mist, cinematic camera. |
Config.Mods, Upgrades, EngineSwaps, UsedEngines, TyreCompounds |
Everything sold in the tuning panel. |
Config.Nitro, Hydraulics, Stance, Ecu |
Performance extras (lowrider hydraulics and stance: see above). |
Config.Wear, RealDamage, Damage, MileageHud |
Wear per km, realistic damage and the mileage counter. |
Config.UsedCars |
Used cars: permissions, garages, scrapyard, test drive, financing, trade-in, margins. |
config_server.lua |
One Discord webhook per category (default for the rest). Server only. |
Texts are in locales/es.lua and locales/en.lua (Config.Locale). The framework, inventory, keys, fuel, phone and target calls live in bridge/server.lua and bridge/client.lua. Both files are open for editing and have custom branches.
Exports (server)
exports.rolo_mechanic:GetMileage(plate) -- km
exports.rolo_mechanic:GetWear(plate) -- { engine_oil = 62, ... } or nil
exports.rolo_mechanic:SetWear(plate, part, pct)
exports.rolo_mechanic:GetUpgrades(plate)
exports.rolo_mechanic:GetInspection(plate) -- { passed, expires, reasons, date, mechanic } or nil
exports.rolo_mechanic:IsInspected(plate) -- true while the ITV is valid
exports.rolo_mechanic:AddHistory(plate, kind, detail)
exports.rolo_mechanic:GetHistory(plate, limit)
exports.rolo_mechanic:GetObdReport(plate) -- last OBD report a mechanic attached: { at, by, codes, counts } or nil
exports.rolo_mechanic:GetWarranties(plate, onlyActive) -- part warranties of a car (see Integrations / Custom)
exports.rolo_mechanic:GetActiveWarranty(plate, part)
exports.rolo_mechanic:GetPartTier(plate, part) -- 'oem' | 'aftermarket' | 'performance'
exports.rolo_mechanic:GetShops() -- { { id, name, job }, ... }
exports.rolo_mechanic:IsMechanicOnDuty(src)
exports.rolo_mechanic:GetShopCars(shopId) -- used cars in stock / on the lot (shopId optional)
Tablet look (Config.TabletCase)
The tablet comes in a rugged case: rubber bumpers in the job's colour, a riveted nameplate on the top, screws, side buttons, status LEDs and the ROLO SCRIPT logo on the bottom bezel (the only logo), and the job's emblem (icon in the case colour + name) on the top-left of the screen. Change the colour, the nameplate text, its icon and the wear ('grease' stains, 'dust'), or use style = 'classic' for the thin frame. How it opens (Config.TabletView): 'hands' = the character takes a real tablet out (everyone sees it), the camera goes first person and the screen rises from below over it, with the game still visible around; closing puts it away and gives the camera back. 'screen' = only the screen.
Escrow: what is open
These files stay open (editable) when the resource is escrowed, exactly as escrow_ignore in fxmanifest.lua says:
config.luaandconfig_server.lua(Discord webhooks, server only);locales/*.lua: every text;bridge/*.lua:bridge/server.lua,bridge/client.luaand the common ROLO bridgebridge/core_server.lua/bridge/core_client.lua;compat/*.lua: inventories, garages, keys, fuel, banking;diag/*.lua: the diagnostics checks;items/*: item definitions for every inventory and the item images.
The rest of the Lua code (client/, server/, shared/) is encrypted. Everything a buyer may need to adapt has a 'custom' hook in the open files above (see Integrations / Custom), so you never need the encrypted code or a ticket.
Secrets: config_server.lua
Discord webhooks and API keys go in config_server.lua, not in config.lua. config.lua is sent to every player's game (FiveM shares it), so anything in it can be read by a cheater; config_server.lua is loaded only by the server. Paste your webhooks there and leave config.lua without secrets.
Compatibility
The shared compatibility core (compat/server.lua + compat/client.lua, open files) detects your systems on start and prints them in the server console, e.g. compat: framework qbcore · inventory ox_inventory · garages qb-garages · society qb-banking.
- Frameworks: QBCore, Qbox and ESX Legacy (full support, including owned vehicles). ox_core, standalone and
'custom'run through the common ROLO bridge (identity, money, jobs, duty, permissions); the owned-vehicle functions readplayer_vehiclesunless you fill the'custom'branches ofbridge/server.lua/compat/server.lua. - Inventories: ox_inventory, origen_inventory, qs-inventory, codem-inventory, core_inventory, qb-inventory, ps-inventory / lj-inventory / tgiann-inventory (through the QBCore player functions).
Config.Inventory = 'custom'+Compat.CustomInventory. - Garages (owned cars): qb-garages, qbx_garages, origen_garages, jg-advancedgarages, cd_garage, qs-advancedgarages, okokGarage. Only the columns your table has are written; if the garage column is missing it says so in the console.
Config.GarageSystem = 'custom'+ thecustomentry ofCompat.GarageSystems. - Bank / business accounts (shop fund): qb-banking, Renewed-Banking, qs-banking, okokBanking, qb-management (
Config.Society,'custom'+Compat.CustomSociety). - Vehicle keys: qb-vehiclekeys, qbx_vehiclekeys, qs-vehiclekeys, wasabi_carlock, MrNewbVehicleKeys, Renewed-Vehiclekeys, mk_vehiclekeys, cd_garage (
Config.VehicleKeys,'custom'+Compat.CustomKeys). - Fuel: ox_fuel, lc_fuel, LegacyFuel, cdn-fuel, ps-fuel, okokGasStation, Renewed-Fuel, native (
Config.Fuel,'custom'+Compat.CustomFuel). - Target: ox_target, qb-target, key prompt,
'custom'. Phone mail: qs-smartphone / qs-smartphone-pro, lb-phone,'custom','none'. Dispatch: origen_police, ps-dispatch, cd_dispatch, qs-dispatch, core_dispatch, rcore_dispatch,'jobs','custom','none'. - Optional ROLO SCRIPT resources (rolo_notify, rolo_interface, rolo_services, rolo_admin): used when they run, never required. If a config value points at one that is not installed, the script falls back to a market alternative instead of erroring.
- Errors are printed in the console with the system's name, never silent.
- Names and columns follow each script's public documentation. Test once after installing with your own setup (the Diagnostics panel helps).
© ROLO SCRIPT
Write to us in the Discord support channel with the script, your framework and the console error.
