# onClientTrailerDetach (Cliente)

> Se dispara en el cliente cuando un remolque se suelta del vehículo que lo arrastraba.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Evento Lua
- **Lado**: Cliente
- **Categoría**: Vehículos
- **URL**: https://wiki.mymp.gg/es/onClientTrailerDetach

## Sintaxis

```lua
addEventHandler("onClientTrailerDetach", root, function(vehicle towedBy) ... end)
```

## Parámetros del handler

| Nombre | Tipo | Descripción |
| --- | --- | --- |
| `towedBy` | `vehicle` | El vehículo que arrastraba el remolque. |

## Source

El remolque.

## Ejemplo

```lua
addEventHandler("onClientTrailerDetach", root, function(towedBy)
    if getPedOccupiedVehicle(localPlayer) == towedBy then
        outputDebugString("Remolque soltado")
    end
end)
```

## Ver también

- [onClientTrailerAttach (Cliente)](https://wiki.mymp.gg/es/onClientTrailerAttach.md): Se dispara en el cliente cuando un remolque se engancha a un vehículo.
- [onTrailerDetach (Servidor)](https://wiki.mymp.gg/es/onTrailerDetach.md): Se dispara en el servidor cuando un remolque se suelta del vehículo que lo arrastraba.
- [getVehicleTowedByVehicle (Compartido)](https://wiki.mymp.gg/es/getVehicleTowedByVehicle.md): Devuelve el remolque o vehículo que este vehículo está remolcando.
- [getVehicleTowingVehicle (Compartido)](https://wiki.mymp.gg/es/getVehicleTowingVehicle.md): Devuelve el vehículo que está remolcando a este vehículo.
