M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
towedByvehicleThe 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)

See also