Sal’s Kewl Korner

Home / Documentation / Sal's Kewl Mechanic

Sal's Kewl Mechanic — owner's manual

A working auto shop: mechanics inspect a vehicle zone by zone, quote the customer, carry real parts and fit them step by step, and AI customers keep the job busy when no player needs one. This manual covers installation, placing a shop, every in-game settings page, the motorcycle, heavy truck and towing work, and how it fits beside your other resources, for server owners.

documents resource version 0.7.0↓ PDF

Overview

A working auto shop for FiveM. Mechanics clock in, put a vehicle on the lift, inspect it zone by zone, quote the customer, carry real parts from the counter and fit them where they belong, and get paid for the work. Players can own a shop and hire staff. When no player needs a mechanic, AI customers pull in and AI breakdowns call from the road, so the job always has work.

Runs on qb-core, qbx_core, ESX and standalone, detected automatically. Needs no target resource and adds no inventory items.

There is no config file to edit. Every setting is changed in game from /mechadmin, and everything the server saves is kept outside this folder, so an update never overwrites it.

Features

  • Work orders. Walk up to a vehicle in the shop and start a work order. Everything about that visit lives on it: what was inspected, what was found, what was quoted, what the customer approved, what has been done.
  • Zone-by-zone inspection. Under the hood, each wheel, the body, and the underside once the vehicle is on a raised lift. An inspection reveals the real condition of the parts in that zone. Nothing shows until you look.
  • Close-up inspection view. The camera moves in on the area being checked, and each part found there is shown as a close-up drawing in the condition it is actually in, with the reading a mechanic would take: pad thickness, tread depth, battery voltage and corrosion, oil color and level.
  • Working lifts, with two stops. Park on a bay, step out, raise the lift. The first stop is wheel height: the hubs at chest height, where brakes and tires are done standing up. The second is full height, with room to stand underneath for oil changes, exhaust, transmission, suspension and the fuel tank. The mechanic's stance follows the vehicle: kneeling at a wheel on the floor, upright at wheel height, reaching up at full height.
  • Real part replacement. Take the part from where the shop keeps it (it is in your hands and other players see it), carry it to the vehicle, and install it at the right spot.
  • Parts stations. Tires come off the tire rack, brakes from the brake shelf, filters and fluids from the tune-up shelf, engines and gearboxes from the drivetrain bay, panels from the body rack. Each station is placed in the shop like the time clock is, and which station a part is kept at is yours to change. A shop that has not placed a station hands those parts out at the parts counter. The repair is real: a replaced tire is no longer flat, engine repair restores the engine, body work removes the damage.
  • Engine swaps. A mechanic can swap the engine in a customer's vehicle. Each engine on the list has its own sound, its own effect on acceleration and top speed, its own price and labor, and can require an inventory item. The swap stays with the vehicle by license plate: everyone nearby hears it, and whoever drives it feels it. Custom streamed sound packs are supported by name. The whole list is edited in /mechadmin.
  • Modifications. A mechanic can modify a player's vehicle at the shop: engine, brake, transmission and suspension upgrades, turbo, armor, spoilers, bumpers, skirts, hoods, grilles, fenders, roofs, roll cages, exhaust tips, horns, wheels, paint in any color and six finishes, liveries, window tint, xenon headlights, underglow and the plate style. The tablet offers only what that vehicle can take, shows the choice on the vehicle while the mechanic picks it, and quotes it on the same estimate as the repairs. Each one is picked up and fitted step by step like a repair, and the vehicle's new look is saved to your framework's garage record.
  • Custom work. Your own list of jobs, with your own names, prices, labor and required items: a nitrous kit, a stance kit, anything another script provides. What a job does when it is fitted is yours to write (see Integrations below).
  • Tuning. Ride height, gearing, brake balance, a street, track or drift grip setup, and boost on a turbocharged vehicle. The mechanic sets the dials on the tablet and can drive the vehicle to feel them before quoting. A fitted tune stays with the vehicle by license plate, and you set how far each dial can go.
  • More for the body shop. Wheel color, custom tires, tire smoke, bulletproof tires, a pearl coat, interior and dashboard colors, headlight color, the model's own extras (racks, bars, toolboxes), and the lowrider and tuner slots: interior trim, seats, steering wheel, shifter, gauges, speakers, hydraulics, trunk, engine bay dress-up and more.
  • Wash and detail. The two jobs every shop sells most.
  • Invoices. The customer gets an invoice when the bill is paid. The last few stay with the vehicle; /mechinvoice reads them again.
  • Warranty for players. A part fitted with a skipped step is under warranty at the shop that fitted it. Brought back in time, it is redone free at the shop's expense.
  • Drop-off. A customer who left a request does not have to stand there. The estimate reaches them wherever they are, or waits until they are back online, and a finished job bills them when they return.
  • Fleet accounts. Police, EMS or a taxi company gets its own discount, and its bill can go to a society account instead of the driver.
  • Plate letters and stolen-vehicle and VIN work, both off until an admin turns them on.
  • Customer requests. A player types /mechrequest and what they want done ("new brakes and a red paint job"). The mechanic sees it on the work order, so nobody has to be standing there to explain.
  • Estimates the customer approves. Check the items to quote and send the estimate. The customer sees each line with parts and labor and approves only what they want. They are billed when the work is finished.
  • Parts plus labor. A line costs the part's retail price plus labor: book hours times the shop's labor rate. The mechanic earns a commission on the labor.
  • Shop types. Every shop works on one kind of vehicle: any vehicle, cars and light trucks, motorcycles only, or big rigs and heavy trucks. A shop opens work orders only on what its type takes, and its AI customers arrive in vehicles to match. Pick the type in /mechadmin > Shops; a shop is "any vehicle" until you change it. A motorcycle shop's bays are motorcycle lifts: a low table that raises the bike to working height, with all the work done standing beside it.
  • Shop ownership. Buy a shop, hire and fire, promote managers, set the labor rate and commission, and run the shop's account. Parts are bought wholesale from the account when they leave the counter, so the margin on parts is the owner's profit. Unowned shops still work for anyone holding the mechanic job.
  • AI customers. When the shop is quiet, an AI driver pulls in with a complaint and one to three things actually wrong. Needed work is always approved, worn parts sometimes, and a line quoted for a part that is fine is always declined. They pay, sometimes tip, and drive away.
  • Talk to AI customers. Walk up and tap Y for a list of questions. This works on every server and needs nothing else. Subscribers to Sal's Kewl Gold can also hold Y to ask out loud in their own words, and the customer answers in a voice of their own (see Working with other resources). Ask what is wrong, where it seems to be coming from, whether anything else has been acting up, and how the estimate sits with them. What they say comes from what is really wrong with the vehicle, so a conversation helps you find the fault.
  • AI breakdowns. Dead battery, flat tire, or out of gas: drive a shop truck out, fix it from the truck, and collect a call-out fee. Or it is something that cannot be fixed at the roadside: tow it in, get paid for the tow, then fix it in the shop.
  • Flatbed winch. Stand behind a flatbed with a vehicle behind it and winch it onto the bed. Unload it anywhere. Hook-and-chain trucks use the game's own tow arm.
  • Calls from players. /callmechanic sends a call to every mechanic on duty, with a map blip and a waypoint.
  • Sal's Kewl Roadside Assist. With Roadside Assist 2.1.0 or later installed, its calls go to the mechanics on duty before its own truck is sent. They show on the shop tablet with Accept and Complete buttons, and the fee is split between the mechanic and the shop like any other labor. Tow requests from Sal's Kewl Public Safety Simulator arrive the same way.
  • Wear. Vehicles players drive wear out a little per kilometer, tracked by license plate, and stay worn until a mechanic replaces the part. Worn brakes stop longer, worn tires lose grip, a tired engine loses top speed, and a failed battery will not start. Every effect can be tuned or turned off.
  • A walkthrough for new mechanics. A coach card shows the one next thing to do, with a marker over where to do it, and follows what the player actually does rather than a fixed script. It appears for anyone new and steps aside after their first finished job. /mechhelp shows or hides it, and the tablet has a How it works page.
  • Demo mode. Another resource can flag a player as a visitor: they can work at any shop without a job, the walkthrough stays on, a practice customer is sent to them, and no money changes hands.
  • Everything set in game. /mechadmin opens a settings screen with every setting, every part's price and labor, and every shop. Nothing is edited in a file.
  • Server-authoritative. Prices, pay, what is wrong with a vehicle, and whether work was really done are all decided on the server.

Requirements

  • FiveM server with OneSync enabled.
  • Optional, detected at runtime: qb-core, qbx_core or es_extended for money and jobs; ox_lib for notifications. On a standalone server the shop works but no money changes hands.

Installation

  1. Copy the sals_kewlmechanic folder into your server's resources folder.
  2. Add to server.cfg:

ensure sals_kewlmechanic add_ace group.admin sals_kewlmechanic.admin allow

  1. Make sure your framework has a mechanic job (qb-core and ESX ship one). To use a different job name, change it on the shop in /mechadmin.
  2. Start the server and place your shop (next section).

Updating

Copy the new sals_kewlmechanic folder over the old one. That is all.

If you have written your own integrations (integrations/my_server.lua, integrations/my_client.lua), copying over leaves them alone: an update never ships files by those names. If you delete the old folder first, keep those two files and put them back.

Nothing the server saves is inside this folder. Shop ownership, staff, shop accounts, every point you placed, every setting you changed and all vehicle wear live in the server's own key-value store (the db folder in your server data), under this resource's name. Two things would lose it: deleting the server's db folder, or renaming this resource.

For moving to a new server, or just to keep a copy, /mechadmin > Backup writes everything to mechanic-backup.json in the resource folder and can restore from it. The same from the server console: mechbackup and mechrestore.

Placing your shop

The shipped shop is Benny's in Strawberry, and its coordinates are a starting point, not a survey. Walk it once and move anything that is in the wrong place.

The easy way: open /mechadmin, go to Shops, and click Walk around and place. The screen closes and you walk the building: press E to save the point named on screen where you are standing (sit in a vehicle for a lift bay), Left / Right to pick a different point, Backspace when you are done. Every point already placed is drawn in the world with its name.

Lifts are placed by looking at them. While a lift bay is the current point, the lift is shown see-through a few steps in front of you, turned the way you face, with a car's outline on it and an arrow for the way cars drive in. Walk and turn until it sits where a vehicle can actually get to, then press E. Up / Down move it farther or nearer.

You can also stand somewhere and click a single point's button on that page. The same page sets the shop's name, price, jobs, trucks and owner, and adds new shops.

The same thing by command:

Command Stand where
/mechsetup bennys place Starts the walk-around placement mode
/mechsetup bennys duty The time clock
/mechsetup bennys counter The parts counter
/mechsetup bennys office The office (buying and managing the shop)
/mechsetup bennys bay 1 Sit in a vehicle parked on the lift, facing the way cars drive in
/mechsetup bennys garage Sit in a vehicle where shop trucks should appear (optional)
/mechsetup bennys dropoff Sit in a vehicle where AI customers should pull up (optional)
/mechsetup bennys waiting Where a waiting AI customer stands (optional)

Add more lifts with bay 2, bay 3, and so on. Remove one with /mechsetup bennys delbay 2.

Other setup commands:

Command What it does
/mechsetup list Lists every shop
/mechsetup create myshop My Shop Name Creates a new shop; then place its points
/mechsetup myshop price 250000 Sets the purchase price (none = not for sale)
/mechsetup myshop owner 12 Gives the shop to server ID 12 (none = no owner)
/mechfix Resets all wear on the vehicle you are sitting in

Lift models. A solid lift model is stood in each bay. If your shop MLO already has lifts built in, turn off Stand a lift model in each bay in /mechadmin > Lifts and inspections.

How a job goes

  1. Clock in at the time clock. The same spot hands out shop trucks.
  2. Start a work order: walk up to the vehicle and press E.
  3. Inspect. Markers appear at the hood, each wheel and the driver's side. To see the underside, park on a bay, get out, and raise the lift from the post beside it: E once for wheel height, E again for full height. The underside needs full height. G at the post goes the other way. Some parts (engine, spark plugs, battery, transmission) cannot be judged by eye and show as Not tested: press G at the driver's door to plug in the scan tool and read the fault codes.
  4. Quote. Open the tablet (/mechanic, F6 by default), check the items, pick the customer, and send the estimate.
  5. Get the parts and the tools. Once approved, take each part from its station or the parts counter. One at a time: your hands are full. If the shop has a tool cart, take the tools for the job from it first.
  6. Install each part at its marker on the vehicle, step by step. The last step of most jobs (torque, test, leak check) can be skipped with X. It is faster, and it can come back on you.
  7. Lower the lift, then complete and bill from the tablet.

Realism

All of this is under /mechadmin > Realism, and each piece has its own switch.

  • Procedures. A repair is a list of steps, each with its own progress bar and a tool in hand. On a raised vehicle the wheel comes off for tire and brake work, and the old part is set down beside you.
  • Tools. Place a tool cart in /mechadmin > Shops and mechanics have to take the tools a job needs before starting it. A shop with no tool cart does not ask for tools, and neither does a roadside job.
  • Diagnosis. An AI customer describes a symptom ("it has no power"), not the failed part, and several parts can cause the same symptom. Worn plugs misfire, a worn transmission slips and worn suspension pulls, for the owner on the road and for a mechanic on a test drive.
  • Comebacks. Skip a step and an AI customer may return under warranty: the shop redoes the part for nothing. Miss the real problem and they return still complaining. On a player's vehicle a part fitted with a step skipped wears out faster.
  • Reputation. Each shop has one, shown on the tablet's Shop tab. Fixing problems raises it; comebacks, missed problems and sending customers away lower it. A good name brings more AI customers and better tips.

Working on your own vehicle or a shop vehicle: pick No customer on the estimate. Nobody is billed. At an unowned shop you pay for the parts yourself.

Commands

Command Who What
/mechanic (F6) Anyone Opens the shop tablet
/mechhelp Anyone Shows or hides the walkthrough
/mechcustomer [roadside] Demo players, admins Sends an AI customer now: to the shop, or a breakdown on the road
/callmechanic [message] Anyone Calls the mechanics on duty to your location
/mechrequest [what you want done] Anyone Leaves a note on your vehicle for the mechanic. It shows on the work order for two hours
/mechinvoice Anyone Shows the invoices kept with the vehicle you are in or beside
/mechdot Anyone Shows the safety inspection certificate of the vehicle you are in or beside
/mechimpound [plate] Anyone Collects a vehicle of yours a shop has impounded. Only with impound turned on
/mechadmin Admins The settings screen: every setting, part, and shop
/mechsetup ... Admins Shop placement by command, see above
/mechdemo [server id] Admins Puts you, or that player, in or out of demo mode
/mechprops Admins Holds each part in turn so you can check the models on your server
/mechfix Admins Resets wear on the current vehicle

Settings

Type /mechadmin in game. Nothing on it asks for a code: keys are picked by name, jobs from your server's own job list, vehicles by sitting in one and clicking, shares on a slider. Changes are saved by the server and take effect right away for everyone; the few that need a restart (command names, the language) are marked. Every page has a Reset this page to defaults button.

Page What is on it
General Price multiplier for the whole economy, language, commands, keys
Walkthrough and demo The coach for new mechanics, and demo mode
Staff and ownership Who may clock in, job grades, whether shops can be bought
Money Labor rate, commission, the shop's credit limit, how bills are paid
Lifts and inspections Full lift height, the wheel height stop, speed, lift models, inspection camera and close-ups
Engine swaps Every engine a mechanic can fit: sound, power, top speed, price, labor, required item
Modifications Modifications on or off, the preview, saving to the garage, the price step per performance level, customer requests, and your custom jobs
Tuning On or off, the most each dial can change, the drift setup, and which shops tune
Customers Invoices, warranty hours for players, drop-off, and the fleet accounts list
Stolen vehicles and VIN Running a VIN and fitting a new one. Everything on it ships off
Wear and tear Wear on or off, wear speed, what worn parts do to a vehicle
AI customers On or off, how often, what they drive, tips, conversations
Roadside and towing Breakdown and tow pay, player calls, Roadside Assist, the winch
Parts and prices Every part: where it is kept, what the shop pays, what the customer pays, labor, work time, wear
Shops Each shop's name, type, price, jobs, trucks, owner, and where everything is
Shop types Which vehicle classes each kind of shop takes, and what its AI customers drive
Backup Back up and restore everything the server has saved

config.lua holds the factory defaults those reset buttons go back to. Do not edit it: it is replaced by every update.

Working with other resources

  • Sal's Kewl Roadside Assist (2.1.0 or later). Nothing to set up. While a mechanic is clocked in here, Roadside Assist offers its calls to them first; with nobody clocked in, its own truck goes. Turn the link off in /mechadmin > Roadside and towing, or with Config.Dispatch.KewlMechanic in Roadside Assist.
  • Sal's Kewl Dispatch (customer voice, subscribers only). Voice is the one feature that is not part of the one-time purchase. Holding Y to speak to an AI customer, and the customer's spoken answers, go through Dispatch's hosted NPC voice: the same one Public Safety Simulator uses. It works for communities with a Sal's Kewl Gold subscription, with Dispatch running and linked. Without one, nothing is missing from the job: Y opens the list of questions, the customer's answers are shown as text, and every other feature works the same. Turn it off in /mechadmin > AI customers. AI usage is included in the base subscription fee for limited amounts and subject to fair use terms. AI pricing and policies may change with at least 30 days' notice to current subscribers. Communities can't use their own OpenAI, Anthropic or other AI keys with our scripts.
  • Sal's Kewl Public Safety Simulator. Tow requests that it hands to Roadside Assist reach your mechanics through the link above. To also let mechanics take its own tow-operator calls, add your mechanic job to Config.Services.towing in that resource.
  • Engine sound packs. Fully compatible. This resource changes a vehicle's sound or handling only when a mechanic has fitted an engine swap to it here; every other vehicle is left alone, so sounds and handling set by vehicle meta files or other resources keep working. To sell a custom pack's sound, install the pack as usual and put its audio name on an engine under /mechadmin > Engine swaps. If another resource also forces a sound onto the same vehicle, whichever does it last is heard.
  • Vehicle keys. A mechanic is given a key to the vehicle on their work order and to the shop truck they take out, and it is taken back when the order closes or the truck is put away. The key script is found automatically. Supported: wasabi_carlock, qs-vehiclekeys, qbx_vehiclekeys, qb-vehiclekeys, Renewed-Vehiclekeys, MrNewbVehicleKeys, mk_vehiclekeys, ak47_vehiclekeys, ak47_qb_vehiclekeys, tgiann-hotwire, dusa_vehiclekeys, t1ger_keys, vehicles_keys (jaksam), fusion-vehicles, okokGarage and cd_garage. /mechadmin > Roadside and towing shows which one it found and lets you pick one by name, turn keys off, or enter your own calls for a key script that is not on the list:
Form What is called
client:<event> A client event on the mechanic's game, with (plate, model)
server:<event> A server event, with (player id, plate, model)
export:<resource>:<name> A server export, with (player id, plate, model)
clientexport:<resource>:<name> A client export on the mechanic's game, with (plate, model)

A key is only given to a mechanic on duty, for their own work order's vehicle or their own shop's truck, while they are standing next to it. - Admin repairs. An admin "fix vehicle" command repairs damage but does not know about wear. Use /mechfix, or call the ResetVehicle export.

Modifications and custom work

On a player's vehicle at the shop, the work order has an upgrades list under the repairs: Performance, Body and wheels, Paint and finish, Custom work. A mechanic picks what goes on, ticks it, and sends the estimate; from there it is a job like any other. Things to know:

  • Only what fits is offered. The options come from the vehicle itself. A car with no spoiler options has no Spoiler line.
  • The preview is real. With Show the choice on the vehicle on, the vehicle changes as the mechanic picks. It goes back when the tablet closes. Nothing stays on the vehicle until it has been approved, picked up and fitted.
  • Prices are on /mechadmin > Parts and prices, one row per modification: what the shop pays, what the customer pays, labor and work time. Performance parts cost more per level (Performance parts: extra per level on the Modifications page). Taking something back off is labor only.
  • It stays on the vehicle. Once fitted, the vehicle's properties are saved to your framework's garage record: player_vehicles.mods on QBCore and Qbox, owned_vehicles.vehicle on ESX, through oxmysql. If your garage keeps vehicles somewhere else, that is one function to change (Hooks.SaveVehicleProps, below). On a standalone server a modification lasts as long as the vehicle does.
  • Custom work is a list on the Modifications page: id, name, what the shop pays, what the customer pays, labor hours, and an optional inventory item the mechanic has to bring. A work order can carry three custom jobs. A custom job changes nothing on its own; your integration decides what it does.

Tuning

Tune is a job on the Performance list of a player's work order. The mechanic sets:

Dial What it does
Ride height Lowers or raises the vehicle. Everyone nearby sees it
Gearing Toward acceleration (shorter gears, less top speed) or toward top speed
Brake balance Toward the front or the rear
Grip setup Street (stock), track (more grip) or drift (a loose rear end and more steering angle)
Boost More power, on a vehicle with a turbo fitted. The dial is not shown without one

While the work order is open, the mechanic feels whatever is on the dials when they drive the vehicle, on their own game only. Nothing is fitted until the customer approves it and the job is done; after that the tune is kept by license plate, like an engine swap, and whoever drives the vehicle feels it. Back to stock takes it off for the price of the labor.

/mechadmin > Tuning sets the most each dial can change (the stock limits are 8 cm of ride height, 15% gearing, 15% brake balance, 12% boost and 6% track grip), whether the drift setup is offered, and which shops tune. A tune stacks with an engine swap, so set the limits with both in mind.

This resource changes a vehicle's handling only when a tune or an engine swap has been fitted here. If another script on your server sets handling as vehicles are driven, turn tuning off: the two would fight. Camber and track width (stance) are not part of it; add those as a custom job.

exports.sals_kewlmechanic:GetTune(netId) returns the dials fitted to a vehicle, and the state bag skmTune on the vehicle carries what they do.

Customers: invoices, warranty, drop-off and fleets

All of it is on /mechadmin > Customers.

  • Invoices. Paying a bill shows the customer an invoice: shop, mechanic, date and every line. The last five are kept with the vehicle and /mechinvoice shows them to whoever is in or beside it.
  • Warranty for players. If a mechanic skips a step fitting a part on a player's vehicle, that part is under warranty at that shop for 72 real hours (yours to change; 0 turns it off). On the next work order there it shows a Warranty marker and quotes at $0: the shop buys the part again and nobody is paid labor. A job done right has no warranty, and neither does crash damage.
  • Drop-off. The customer runs /mechrequest at their vehicle and leaves. On the work order, the customer list offers them with "left a request". If they are online the estimate opens on their screen wherever they are. If they are offline it waits and opens when they come back, as long as the vehicle is still at the shop. When the job is finished and they are offline, the mechanic is paid at once from the shop's account and the customer is billed when they next join; the shop gets the money then.
  • Fleets. Each row is one account: a name, the letters its plates start with or a job, a discount, and optionally an account to bill. A work order on a fleet vehicle says so and quotes the fleet price. With an account set, the bill is taken from that account through Hooks.ChargeAccount, which tries Renewed-Banking, qb-banking, qb-management, okokBanking and ESX society accounts; if none of them takes it, the driver is billed.

Motorcycles, heavy trucks and towing

A motorcycle shop and a heavy truck shop are not a car shop with a different sign. What each kind of vehicle gets:

Motorcycles

  • Chain and sprockets, a wear part only a motorcycle has. A stretched chain makes the bike surge under throttle.
  • Motorcycle prices and times. Repairs cost less and take less time than a car's (/mechadmin > Motorcycles and heavy trucks).
  • The bike's own parts by name. Handlebars, saddlebags, a fairing, the fuel tank: the tablet uses the game's names for the options a bike has, and the rear wheel is its own job.
  • A sprocket change. The gearing dial of a tune has more range on a motorcycle.

Heavy trucks

  • Air brakes in place of ordinary brakes.
  • The second rear axle. A vehicle with six wheels or more has its extra tires inspected and replaced.
  • Heavy prices and times. Repairs cost more and take longer.
  • No car lift. A heavy truck shop's bays have no lift: the truck is chocked where it stands and worked from beside.
  • Fifth wheel service and trailer service (the trailer has to be hooked up to the truck).
  • DOT safety inspection. The truck passes when its brakes, tires, suspension and exhaust do not need replacing. The certificate stays with the truck; anyone standing at it can read it with /mechdot, and another script can with the GetInspection(plate) export.

Towing

  • Hook-and-chain trucks hook up the vehicle behind them with one key.
  • A heavy wrecker tows a big rig or a bus, which a flatbed refuses. The big stock tow truck does this out of the box; add your own wrecker model on the Towing page. With a wrecker at the shop, turn off "Heavy truck breakdowns are never towed" on the Shop types page.
  • Recovery. A vehicle on its roof, on its side or in the water is winched out and set on its wheels before it can be towed or worked on. Some AI tow jobs need it first and pay a recovery fee. On a player's vehicle, quote the Recovery job.
  • Impound ships off. Turned on (/mechadmin > Impound), a mechanic with a work order on a vehicle at the shop can impound it from the tablet. Its owner collects it at the shop with /mechimpound for the tow fee plus storage per day. Your garage script is told through Hooks.OnImpounded and Hooks.OnImpoundReleased in integrations/server.lua; without those, an owner could still pull the vehicle out of their garage.

Running another towing script? Turn on "Another script handles towing" (/mechadmin > Towing). This resource then shows no winch, hook or recovery prompts, so the two never offer the same truck twice. Nothing else changes: an AI tow job pays once the vehicle is at the shop, however it got there, and a vehicle that needed recovering counts as recovered once it is back on its wheels with a mechanic of the shop beside it, whatever righted it.

Fleet service. A fleet vehicle is due a service every so many kilometers (/mechadmin > Customers). Its driver is told once, the work order says so, and the Fleet service job starts the count again. The job is offered on vehicles that belong to a fleet by their plate.

Plate letters, stolen vehicles and VIN work

Both are off until you turn them on, and both change your framework's vehicle records. Read the hooks they use before you do.

  • Plate letters (/mechadmin > Modifications > Mechanics can change plate letters). The mechanic types the new letters; they are refused if another vehicle has them. Fitting the plate moves the registration to the new letters (Hooks.ChangePlate), along with this resource's own wear, engine swap and invoices for the vehicle. If your key or garage script keeps things by plate, tell it in that hook.
  • Run the VIN (/mechadmin > Stolen vehicles and VIN). A button on the work order tells the mechanic who the vehicle is registered to, that nobody has it on file, or that it is reported stolen (Hooks.VehicleOwner, Hooks.IsStolen).
  • New VIN and paperwork. A job on the Paperwork list, offered only on a vehicle nobody has on file. Fitting it registers the vehicle to the customer (Hooks.RegisterVehicle), which is how a stolen vehicle becomes somebody's own. It is priced high on purpose, can require an inventory item, and the customer has to be there. The stock hook writes the columns stock qb-core and ESX use; check it against your garage script.

Integrations

integrations/server.lua and integrations/client.lua are plain, unencrypted Lua. They hold the hooks the mechanic job calls so you can connect it to the rest of your server without touching the job itself.

To change one, make a new file beside it, integrations/my_server.lua or integrations/my_client.lua, and write only the hooks you want. Yours loads after the stock file, so it wins, and updates never replace it. Restart the resource after changing it; the server console says whether it loaded.

-- integrations/my_server.lua
function Hooks.ApplyCustom(src, netId, plate, custom, order)
    if custom.id == 'nitrous' then exports['my_nitrous']:Install(plate) end
end

function Hooks.PriceFor(order, partId, parts, labor)
    if order.plate:sub(1, 4) == 'CITY' then return parts, 0 end   -- city vehicles: no labor
end

Server hooks:

Hook When Return
SaveVehicleProps(src, plate, props, netId) A modification was fitted and the vehicle's look should be kept
ApplyCustom(src, netId, plate, custom, order) A custom job was fitted
CanOpenOrder(src, shop, netId, plate) A mechanic is opening a work order false, 'reason' to refuse
OnOrderOpened(order, src) A work order was opened on a player's vehicle
PriceFor(order, partId, parts, labor) A line is being quoted new parts, labor to change the price
OnWorkDone(order, partId, line) A repair, modification or custom job was finished
OnOrderPaid(order, total, labor, pay) The customer paid
OnOrderClosed(order) A work order was closed without a bill
ChargeAccount(account, amount, order) A fleet's bill is due true if the account paid
VehicleOwner(plate) A VIN is being run, or a re-VIN checked { name, cid }, or nothing if nobody has it on file
IsStolen(plate) A VIN is being run true if it is reported stolen
RegisterVehicle(src, plate, props, model) A re-VIN was finished false if it could not be filed
PlateTaken(plate) New plate letters are being quoted or fitted true if another vehicle has them
ChangePlate(src, old, new, netId) A plate change is being fitted false, 'reason' to refuse

Client hooks:

Hook When Return
GetVehicleProperties(vehicle) The vehicle's look is being read to save it the properties table
ApplyMod(vehicle, partId, mod, choice) A modification is about to go on a vehicle true if you fitted it yourself
OnModApplied(vehicle, partId, choice) A modification was fitted
ApplyCustom(vehicle, custom) A custom job was fitted
OnRepairApplied(vehicle, partId) A repair was finished
Notify(text, kind) The job is telling a player something true if you showed it

A hook with a mistake in it is reported in the console and skipped. It cannot stop a work order.

Engine swaps

Open /mechadmin > Engine swaps. Each row is one engine:

Column What it is
Id A short name for it: letters, numbers, underscores
Name What the mechanic and the customer see
Sound The engine sound. Any stock vehicle's model name works (dominator, adder). For a custom streamed sound pack, use the pack's audio name. Blank keeps the vehicle's own sound
Power Acceleration multiplier. 1.25 is 25% more
Top speed Top speed multiplier
Shop pays / Customer pays The price of the engine itself
Labor hrs Billed at the shop's labor rate
Item An inventory item the mechanic must bring, used up by the swap (v8_engine). Blank: the engine is bought at the parts counter

A swapped engine is silent or sounds stock. The sound name does not match anything the server has loaded.

  1. Sit in any vehicle, open /mechadmin, and press Test on that row. It plays the sound on your vehicle, for you only.
  2. If it is silent, the name is wrong or the pack is not running. The name must match the pack's audio name exactly (its .awc / audioNameHash), not the resource's folder name.
  3. Make sure the sound pack is started in server.cfg (ensure <pack>) before players join. A pack started later is not streamed to players already connected.

Demo mode

For showing the job to someone who is not a mechanic: a visitor on a demo server, or a new hire in training. Another resource switches it on for one player:

exports.sals_kewlmechanic:SetDemoMode(src, true)    -- false to leave
exports.sals_kewlmechanic:IsDemoMode(src)           --> boolean
exports.sals_kewlmechanic:StartDemoCustomer(src, faults, force)  --> boolean; sends a practice customer now. faults: optional list of part ids to arrive with; force: also for a player not in demo mode
exports.sals_kewlmechanic:GetShops()                --> { { id, label, duty = {x,y,z}, bays }, ... }

While a player is in demo mode:

  • they can clock in at any shop, with no job and without being hired
  • the walkthrough is always on, job after job
  • an AI customer pulls in shortly after they clock in, and they can call for another at any time with /mechcustomer or the tablet's Send me a customer buttons
  • parts cost the shop nothing and the work pays nothing: the bill is shown, no money moves (turn on Demo work pays real money to change that)
  • they cannot bill another player

It ends when the other resource calls SetDemoMode(src, false) or the player leaves the server. A visitor who was only clocked in through the demo is clocked out with it. Admins can try it by hand with /mechdemo.

Models and animations

This version uses the game's own models and animations, and ships no custom model or animation files, so it adds nothing to download.

Each part is carried as the thing it is, where the game has a model for it: an engine block, a gearbox, an exhaust, a radiator, a coilover, a brake caliper, a wheel, a battery, an oil can, a body panel. Small parts with no model of their own (plugs, filters, belts) come in a box. Every part has a list of models, most fitting first, and the first one your server's game build has is used; /mechprops holds each part in turn and tells you when a stand-in is being shown.

Before working, the mechanic steps up to the spot and squares to it: the wheel hub, the engine bay, the panel.

For developers

Server exports:

exports.sals_kewlmechanic:IsOnDuty(src)             -- true / false
exports.sals_kewlmechanic:GetDutyShop(src)          -- shop id or nil
exports.sals_kewlmechanic:GetOnDutyCount(shopId)    -- shopId optional
exports.sals_kewlmechanic:GetOpenOrders(shopId)     -- shopId optional
exports.sals_kewlmechanic:GetActiveJobs(shopId)
exports.sals_kewlmechanic:GetVehicleCondition(netId) -- { partId = 0..100 }
exports.sals_kewlmechanic:ResetVehicle(plate)       -- clears wear
exports.sals_kewlmechanic:GetTruckLoad(truckNetId)  -- net id on the flatbed, or nil
exports.sals_kewlmechanic:GetKeySystem()            -- the key script in use, 'events' or 'none'
exports.sals_kewlmechanic:GetEngineSwap(netId)      -- id of the engine fitted, or nil
-- state bag `skmEngine` on a vehicle: { id, audio, power, top } of a fitted engine swap
exports.sals_kewlmechanic:CreditRoadsideCall(src, amount, callNo) -- used by Roadside Assist

State bags: a shop truck carries skmShop (its shop id); a loaded flatbed carries skmLoad (the net id of the vehicle on the bed).

Support

Sal's Kewl Scripts: https://salskewlkorner.com

Didn’t find it? Ask Squawky, or open a ticket on Discord and tell us what you already tried.