# getVehicleTowingVehicle (Compartilhado)

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

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

## Sintaxe

```lua
vehicle|false getVehicleTowingVehicle(vehicle vehicle)
```

## Parâmetros

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

## Retorno

O veículo que reboca, ou `false` se ninguém está puxando este.

## Exemplo

```lua
addEventHandler("onTrailerAttach", root, function()
    local truck = getVehicleTowingVehicle(source)
    if truck then
        setVehicleOverrideLights(truck, 2)
    end
end)
```

## Veja também

- [getVehicleTowedByVehicle (Compartilhado)](https://wiki.mymp.gg/pt/getVehicleTowedByVehicle.md): Devolve o reboque ou veículo que este veículo está puxando.
- [onTrailerDetach (Servidor)](https://wiki.mymp.gg/pt/onTrailerDetach.md): Disparado no servidor quando um reboque é solto do veículo que o puxava.
