> For the complete documentation index, see [llms.txt](https://docs.av-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.av-scripts.com/laptop-pack/boosting/installation/garages.md).

# Garages

When using the VIN scratch feature, the script saves essential vehicle data (model, modifications, plate, and status) to the default framework database tables:

* **QBCore / Qbox:** `player_vehicles`
* **ESX:** `owned_vehicles`

**Custom Garage Scripts:** Many paid or custom garage scripts use different database columns than the default frameworks. It is your responsibility to modify the SQL queries to ensure they are compatible with your specific garage system. You can edit the database queries in `av_boosting/server/editable/_database.lua`

{% code title="av\_boosting/server/editable/\_database.lua" %}

```lua
lib.callback.register("av_boosting:saveVin", function(source, vehProperties, missionId)
    local src = source
    local newPlate = generatePlates()
    local Player = exports['av_laptop']:getPlayer(src)
    vehProperties['plate'] = newPlate
    dbug("Saving VIN scratch for player, new plate:", newPlate, "Framework:", Framework)
    local missionData = allMissions[missionId]
    if not missionData then
        dbug("Mission data not found for missionId:", missionId)
        return nil
    end
    deleteMission(missionId, true)
    if Framework == "qb" or Framework == "qbox" then
        MySQL.insert.await('INSERT INTO '..Database['vehicleTable']..' (`license`, `'..Database['ownerColumn']..'`, `vehicle`, `hash`, `mods`, `plate`, `vinscratch`) VALUES (?, ?, ?, ?, ?, ?, ?)', {
            Player.PlayerData.license,
            Player.PlayerData.citizenid,
            missionData and missionData.model or vehProperties['model'],
            GetHashKey(missionData and missionData.model or vehProperties['model']),
            json.encode(vehProperties),
            vehProperties['plate'],
            1
        })
    elseif Framework == "esx" then
        local identifier = Player.getIdentifier()
        MySQL.insert.await('INSERT INTO '..Database['vehicleTable']..' (`'..Database['ownerColumn']..'`, `plate`, `vehicle`, `vinscratch`) VALUES (?, ?, ?, ?)', {
            identifier,
            vehProperties['plate'],
            json.encode(vehProperties),
            1
        })
    end
    addVehicleKeys(src, newPlate)
    return newPlate
end)
```

{% endcode %}

{% hint style="warning" %}
There are currently over +100 custom garage scripts available, and I do not have access to all of them. Because of this, official support is only provided for default framework garages.
{% endhint %}
