> For the complete documentation index, see [llms.txt](https://docs.vames-store.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vames-store.com/assets/vms_tuning/guides/garage-integration/jg-advancedgarages.md).

# jg-advancedgarages

1. Navigate to the **jg-advancedgarages/framework/cl-functions.lua**
2. Find `Framework.Client.SetVehicleProperties` and customize:

```lua
---@param vehicle integer
---@param props table
function Framework.Client.SetVehicleProperties(vehicle, props)
  if GetResourceState("jg-mechanic") == "started" then
    return exports["jg-mechanic"]:setVehicleProperties(vehicle, props)
  else
    if Config.Framework == "QBCore" then
      TriggerServerEvent('JGxVMS:ApplyTuning', NetworkGetNetworkIdFromEntity(vehicle), props) -- Added
      return QBCore.Functions.SetVehicleProperties(vehicle, props)
    elseif Config.Framework == "Qbox" then
      TriggerServerEvent('JGxVMS:ApplyTuning', NetworkGetNetworkIdFromEntity(vehicle), props) -- Added
      return lib.setVehicleProperties(vehicle, props)
    elseif Config.Framework == "ESX" then
      TriggerServerEvent('JGxVMS:ApplyTuning', NetworkGetNetworkIdFromEntity(vehicle), props) -- Added
      return ESX.Game.SetVehicleProperties(vehicle, props)
    end
  end
end
```

3. Navigate to the **jg-advancedgarages/config/config-sv.lua**
4. Register new server event:

```lua
RegisterNetEvent('JGxVMS:ApplyTuning', function(netId, props)
    local entity = NetworkGetEntityFromNetworkId(netId)
    TriggerEvent("entityCreated", entity)
    Entity(entity).state:set('VehicleProperties', props, true)
end)
```
