Перейти к содержанию

OnVehicleDeath

Материал из RAGE MP Wiki Archive
Версия от 01:09, 30 ноября 2019; imported>Spotify (Created page with "This event is triggered when a vehicle has been destroyed. {{CSharpContainer| {{#tag:syntaxhighlight| [ServerEvent(Event.VehicleDeath)] |lang=csharp }} {{Parameters}} *'''ve...")
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

This event is triggered when a vehicle has been destroyed.


<syntaxhighlight lang="csharp"> [ServerEvent(Event.VehicleDeath)] </syntaxhighlight>

Parameters

  • vehicle: parameter input should be in Vehicle type

Example

<syntaxhighlight lang="csharp"> [ServerEvent(Event.VehicleDeath)] public void OnVehicleDeath(Vehicle vehicle) { NAPI.Util.ConsoleOutput($"{vehicle.DisplayName} ({vehicle.Handle}) was destroyed."); } </syntaxhighlight>