onTrailerAttach
ServidorEventoCancelable
Se dispara en el servidor cuando un remolque se engancha a un vehículo. Cancelar el evento suelta el remolque.
addEventHandler("onTrailerAttach", root, function(vehicle towedBy) … end)
Parámetros del handler
| Nombre | Tipo | Descripción |
|---|---|---|
| towedBy | vehicle | El vehículo que pasó a arrastrar el remolque. |
Source
El remolque.
Ejemplo
addEventHandler("onTrailerAttach", root, function(towedBy)
if isVehicleLocked(source) then
cancelEvent()
end
end)