TrailerAttached: Difference between revisions

From RAGE Multiplayer Wiki
(Created page with "Event triggered when a vehicle's trailer is attached. WARNING : If this event is not working, please use trailerAttached instead of vehicleTrailerAttach. If this resolves you...")
 
mNo edit summary
Line 1: Line 1:
Event triggered when a vehicle's trailer is attached.
Event triggered when a vehicle's trailer is attached.
WARNING : If this event is not working, please use trailerAttached instead of vehicleTrailerAttach. If this resolves your problem, please inform someone on the discord to update this page.


==Parameters==
==Parameters==
Line 9: Line 7:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
mp.events.add("vehicleTrailerAttach", (vehicle, trailer) => {
mp.events.add("trailerAttached", (vehicle, trailer) => {
  // Do what you want.
  // Do what you want.
});
});
</syntaxhighlight>
</syntaxhighlight>

Revision as of 21:30, 19 January 2018

Event triggered when a vehicle's trailer is attached.

Parameters

  • vehicle
  • trailer

Example

mp.events.add("trailerAttached", (vehicle, trailer) => {
 // Do what you want.
});