M MY Multiplayer: Wiki
Side
Kind

onClientTrailerAttach

ClientEvent

Fired on the client when a trailer is hitched to a vehicle.

addEventHandler("onClientTrailerAttach", root, function(vehicle towedBy) … end)

Handler parameters

NameTypeDescription
towedByvehicleThe vehicle now towing the trailer.

Source

The trailer.

Example

addEventHandler("onClientTrailerAttach", root, function(towedBy)
    if getPedOccupiedVehicle(localPlayer) == towedBy then
        outputDebugString("Trailer hitched")
    end
end)

See also