VehicleDeath: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
Line 6: Line 6:
==Example==
==Example==
This example will destroy vehicles, which are exploded
This example will destroy vehicles, which are exploded
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServerSide}}
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
 
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
mp.events.add('vehicleDeath', (vehicle) => {
mp.events.add('vehicleDeath', (vehicle) => {
Line 14: Line 12:
});
});
</syntaxhighlight>
</syntaxhighlight>
</div>


==See also==
==See also==
{{Player_events}}
{{Player_events}}

Revision as of 16:12, 14 January 2018

This event is triggered when a vehicle is exploded.

Parameters

  • vehicle - vehicle, that is exploded

Example

This example will destroy vehicles, which are exploded

Server-Side

mp.events.add('vehicleDeath', (vehicle) => {
    vehicle.destroy()
});

See also

Checkpoint

Colshape

Entity

Player

Streaming

Vehicle

Waypoint