ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server events
  3. onTrailerAttach

Event

onTrailerAttach

ServerVehiclesIdentical to MTA:SA

A trailer was attached to a vehicle.

Handler

addEventHandler("onTrailerAttach", root, function(theTruck) ... end)

Parameters

theTruckvehicle
The towing vehicle.

Source

source is the trailer.

cancelEvent() blocks the attachment.

Example

addEventHandler("onTrailerAttach", root, function(truck)
    local driver = getVehicleController(truck)
    if driver then outputChatBox("Naczepa doczepiona.", driver) end
end)

See also