TrailerAttached: Difference between revisions
mNo edit summary |
No edit summary |
||
| (4 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("trailerAttached", (vehicle, trailer) => { | mp.events.add("trailerAttached", (vehicle, trailer) => { | ||
| Line 11: | Line 18: | ||
}); | }); | ||
</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.
});