onClientTrailerAttach
ClientEvent
Fired on the client when a trailer is hitched to a vehicle.
addEventHandler("onClientTrailerAttach", root, function(vehicle towedBy) … end)
Handler parameters
| Name | Type | Description |
|---|---|---|
| towedBy | vehicle | The vehicle now towing the trailer. |
Source
The trailer.
Example
addEventHandler("onClientTrailerAttach", root, function(towedBy)
if getPedOccupiedVehicle(localPlayer) == towedBy then
outputDebugString("Trailer hitched")
end
end)