onClientTrailerDetach
ClientEvent
Fired on the client when a trailer is unhitched from the vehicle towing it.
addEventHandler("onClientTrailerDetach", root, function(vehicle towedBy) … end)
Handler parameters
| Name | Type | Description |
|---|---|---|
| towedBy | vehicle | The vehicle that was towing the trailer. |
Source
The trailer.
Example
addEventHandler("onClientTrailerDetach", root, function(towedBy)
if getPedOccupiedVehicle(localPlayer) == towedBy then
outputDebugString("Trailer unhitched")
end
end)