Jump to content

OnVehicleTyreBurst: Difference between revisions

From RAGE Multiplayer Wiki
Spotify (talk | contribs)
Created page with "This event is triggered when a vehicle's tyre bursts. {{CSharpContainer| {{#tag:syntaxhighlight| [ServerEvent(Event.VehicleTyreBurst)] |lang=csharp }} {{Parameters}} *'''veh..."
 
Aurio (talk | contribs)
Formatting
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This event is triggered when a vehicle's tyre bursts.
This event is triggered when a vehicle's tyre bursts.
{{CSharpContainer|
{{CSharpContainer|
{{#tag:syntaxhighlight|
{{#tag:syntaxhighlight|
Line 16: Line 15:
public void OnVehicleTyreBurst(Vehicle vehicle, int tyreIndex)
public void OnVehicleTyreBurst(Vehicle vehicle, int tyreIndex)
{
{
NAPI.Util.ConsoleOutput($"{vehicle.DisplayName} ({vehicle.Handle}) a tire was popped {tyreIndex}.");  
NAPI.Util.ConsoleOutput($"{vehicle.DisplayName} ({vehicle.Handle})'s tire was popped {tyreIndex}.");  
}
}
|lang=csharp}}
|lang=csharp}}

Latest revision as of 13:15, 28 February 2020

This event is triggered when a vehicle's tyre bursts.

C# Syntax

[ServerEvent(Event.VehicleTyreBurst)]

Parameters

  • vehicle: parameter input should be in Vehicle type
  • tyreIndex: parameter input should be in int type

Example

[ServerEvent(Event.VehicleTyreBurst)]
public void OnVehicleTyreBurst(Vehicle vehicle, int tyreIndex)
{
	NAPI.Util.ConsoleOutput($"{vehicle.DisplayName} ({vehicle.Handle})'s tire was popped {tyreIndex}."); 
}