TrailerAttached: Difference between revisions
(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...") |
No edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Event triggered when a vehicle's trailer is attached. | Event triggered when a vehicle's trailer is attached. | ||
{{ServersideJsEvent}} | |||
{{CSharpContainer|1= | |||
See [[OnVehicleTrailerChange]]. | |||
}} | |||
{{JSContainer| | |||
{{Parameters}} | |||
* '''vehicle''': {{RageType|Vehicle}} | |||
* '''trailer''': {{RageType|Vehicle}} | |||
{{Example}} | |||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
mp.events.add(" | mp.events.add("trailerAttached", (vehicle, trailer) => { | ||
// Do what you want. | // Do what you want. | ||
}); | }); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
[[Category:Vehicle]] | |||
[[Category:Server-side Event]] | |||
Latest revision as of 18:58, 15 May 2024
Event triggered when a vehicle's trailer is attached.
Server-Side Event
C# Syntax
JavaScript Syntax
Parameters
- vehicle: Vehicle
- trailer: Vehicle
Example
mp.events.add("trailerAttached", (vehicle, trailer) => {
// Do what you want.
});