# getVehicleTowedByVehicle (Shared)

> Returns the trailer or vehicle this vehicle is towing.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Vehicles
- **URL**: https://wiki.mymp.gg/en/getVehicleTowedByVehicle

## Syntax

```lua
vehicle|false getVehicleTowedByVehicle(vehicle vehicle)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `vehicle` | `vehicle` | The vehicle that tows. |

## Returns

The towed vehicle, or `false` if it is not towing anything.

## Example

```lua
addCommandHandler("reboque", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    local trailer = vehicle and getVehicleTowedByVehicle(vehicle)
    if trailer then
        fixVehicle(trailer)
    end
end)
```

## See also

- [getVehicleTowingVehicle (Shared)](https://wiki.mymp.gg/en/getVehicleTowingVehicle.md): Returns the vehicle that is towing this vehicle.
- [onTrailerAttach (Server)](https://wiki.mymp.gg/en/onTrailerAttach.md): Fired on the server when a trailer is hitched to a vehicle. Cancelling the event unhitches the trailer.
