RU/onTrailerAttach

From Multi Theft Auto: Wiki
Revision as of 15:44, 6 March 2010 by PoliticalOrel (talk | contribs)
Jump to navigation Jump to search

Данное событие происходит, когда прицеп присоединяется к грузовику.

Параметры

vehicle theTruck
  • theTruck: Грузовик, к которому был присоединен прицеп

Источник

The source of this event is the trailer vehicle that the truck got attached to.

Cancel effect

If this event is canceled, the trailer will detach from the truck again.

Example

This example removes a trailer from the truck it is attached to. Good if you do not want people attaching trailers to vehicles

function detachTrailer(theTruck)
    detachTrailerFromVehicle(theTruck, source) --detach the newly attached trailer
 end
addEventHandler("onTrailerAttach", getRootElement(), detachTrailer)

See Also

Vehicle events


Event functions