M MY Multiplayer: Wiki
Side
Kind

onTrailerDetach

ServerEvent

Fired on the server when a trailer is unhitched from the vehicle towing it.

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

Handler parameters

NameTypeDescription
towedByvehicleThe vehicle that was towing the trailer.

Source

The trailer.

Example

addEventHandler("onTrailerDetach", root, function(towedBy)
    local driver = getVehicleController(towedBy)
    if driver then
        outputDebugString(getPlayerName(driver) .. " soltou o reboque")
    end
end)

See also