Documentation

VIN Scratching

How VIN inspection, scratching, recovery, and permanent seizure work.

Every owned vehicle in Garages has a VIN. It is the vehicle's permanent identity, and it stays the same when the plate is changed or a fake plate is applied.

VIN scratching lets players remove the readable VIN from a vehicle, so it can no longer be identified through a VIN inspection. Police can inspect VINs, recover scratched VINs if you enable it, and permanently seize vehicles that have a scratched VIN.

Scratching only changes whether the VIN can be read. The vehicle keeps its owner, garage, keys, and plate, and the owner can still store, take out, and drive it like normal.

#Overview

ActionCommandTarget OptionWho Can Use ItEnabled by Default
Inspect VIN/getvinInspect VINpoliceYes
Scratch VIN/scratchvinRemove VINEveryone with access to the vehicleYes
Recover VIN/recovervinRecover VINpoliceNo
Permanent SeizureImpound menuImpound menupolice, mechanicYes

All of these can be changed in the vinScratch config.

The commands use the vehicle you are sitting in, or the nearest vehicle if you are on foot. The target options only show up for players whose job is allowed to use them. You have to be within maxDistance of the vehicle, which is 3 metres by default.

#Supported Vehicles

VIN inspection, scratching, and recovery only work on owned vehicles that are saved in the database. They do not work on:

  • Temporary vehicles, such as spawned or mission vehicles without an owner.
  • Vehicles that are ignored by Garages.
  • Display vehicles inside garage interiors.

#Inspecting a VIN

Use /getvin or the Inspect VIN target option.

  • If the VIN is readable, it is shown in a notification and copied to your clipboard.
  • If the VIN has been scratched, you are told that the VIN has been removed. The VIN is not shown.

Inspecting does not need any tools and does not change anything on the vehicle. It works from inside the vehicle or from outside of it.

#Scratching a VIN

  1. Stand next to the vehicle. The vehicle has to be stopped and empty, so you cannot do this from inside it.
  2. Make sure you have the required tools in your inventory. By default this is one screwdriverset.
  3. Use /scratchvin or the Remove VIN target option.
  4. Complete the skill checks. By default there are two, a medium one followed by a hard one.
  5. Wait for the progress bar to finish. It takes 10 seconds by default and you are frozen in place while it runs. You can cancel it at any time.

When the progress bar finishes, the VIN is marked as scratched and can no longer be read.

With requireAccess enabled, which is the default, you can only scratch vehicles that you own or have been given access to through Garages. This includes shared vehicles and profession vehicles you have access to. Having a key to the vehicle is not enough on its own. This means a player cannot steal a car and scratch its VIN by default. Set requireAccess to false if you want anyone to be able to scratch any owned vehicle.

A vehicle that is already scratched cannot be scratched again.

#Tools

Tools are listed under scratching.tools, and every listed tool is required. Each tool has a name, an amount (defaults to 1), and a remove option.

  • With remove = false, the tool only has to be in the player's inventory.
  • With remove = true, the tool is removed after a successful scratch.

Tools are never removed when a skill check is failed or the progress bar is cancelled. Make sure the tool items exist in your inventory resource.

#Recovering a VIN

Recovery lets police restore a scratched VIN so it can be read again. It is disabled by default. Set recovery.enabled to true to turn it on.

Use /recovervin or the Recover VIN target option. It works the same way as scratching, with tools, skill checks, and a progress bar. By default it uses two hard skill checks and takes 12 seconds.

Recovery does not require access to the vehicle, and it only works on vehicles with a scratched VIN. Once recovered, the VIN can be inspected and the vehicle can be impounded like normal.

#Impounding and Permanent Seizure

A vehicle with a scratched VIN cannot be impounded the normal way. In the impound menu, the vehicle is listed as "This vehicle's VIN has been removed." instead of showing its VIN. Searching for the vehicle's plate in the impound menu gives the same message.

Instead, jobs listed in deletionPermission can permanently seize the vehicle. When they open the impound menu next to a vehicle with a scratched VIN, a Permanent Seizure option appears. It is only shown when:

  • The player's job is listed in deletionPermission.
  • The vehicle's VIN is scratched.
  • The vehicle is out in the world and within maxDistance of the player.
  • The CanDeleteScratchedVehicle hook allows it.

The job also has to be set up as an impound job, since the option is part of the impound menu.

Permanent seizure deletes the vehicle from the database and cannot be undone. The owner loses the vehicle, its keys are removed, any impound record is cleared, and the vehicle is removed from the world.

To turn permanent seizure off, set deletionPermission = {}.

#Clearing a Scratched VIN as Staff

Staff can check and clear a scratched VIN through the staff vehicle menu (/gvehicles). The vehicle details show whether the VIN is scratched, and the Clear Scratched VIN action restores it. This works even when recovery is disabled.

#Server Checks

The client only handles the skill checks, the progress bar, and the animation. Everything else is checked by the server:

  • Job, access, distance, tools, and vehicle state are checked when the action starts, and again when it finishes. If anything has changed in between, such as the vehicle driving off or someone getting in, the action fails.
  • The progress bar duration is also enforced by the server. An action that finishes faster than the configured duration is rejected.
  • An action has to be finished within 60 seconds of starting it.
  • Each player can only have one action running at a time.

#Common Changes

GoalChange
Let everyone inspect VINsSet inspection.jobs = false
Only let certain jobs scratch VINsSet scratching.jobs to a list of jobs, such as {"mechanic"}
Let anyone scratch any owned vehicleSet scratching.requireAccess = false
Use up the tool when scratchingSet remove = true on the tool
Turn on VIN recoverySet recovery.enabled = true
Turn off permanent seizureSet deletionPermission = {}
Turn off scratching completelySet scratching.enabled = false
Hide the target options and only use commandsSet target = false on each action

#Integrations

For more control, see the following:

  • Can-Check Hooks: CanScratchVin, CanRecoverVin, and CanDeleteScratchedVehicle let you add your own rules to scratching, recovery, and permanent seizure.
  • Exports & Events: IsVinScratched, InspectVehicleVin, SetVinAsScratched, and DeleteVehicleWithScratchedVin let other resources check, inspect, scratch, recover, and seize vehicles.