# getVehicleTowedByVehicle (Compartilhado)

> Devolve o reboque ou veículo que este veículo está puxando.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Função Lua
- **Lado**: Compartilhado
- **Categoria**: Veículos
- **URL**: https://wiki.mymp.gg/pt/getVehicleTowedByVehicle

## Sintaxe

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

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `vehicle` | `vehicle` | O veículo que reboca. |

## Retorno

O veículo rebocado, ou `false` se não está puxando nada.

## Exemplo

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

## Veja também

- [getVehicleTowingVehicle (Compartilhado)](https://wiki.mymp.gg/pt/getVehicleTowingVehicle.md): Devolve o veículo que está puxando este veículo.
- [onTrailerAttach (Servidor)](https://wiki.mymp.gg/pt/onTrailerAttach.md): Disparado no servidor quando um reboque é engatado num veículo. Cancelar o evento solta o reboque.
