SetVehicleHealth

From GT-MP
Jump to: navigation, search
SetVehicleHealth
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Sets the vehicle's (engine) health. This API is equal to setVehicleEngineHealth.

Syntax

In C#
Server-Side Function

API.setVehicleHealth(NetHandle vehicle, float health);

Required Arguments

  • vehicle: parameter input should be in NetHandle type.
  • health: parameter input should be in float type.
Icon-info.png
Full health from a vehicle is 1000.0 but you can use higher values.

Usage example(s)

In C#
Server-Side Function

API.setVehicleHealth(NetHandle vehicle, float health);

References