SetVehicleHealth

From GTA Network Wiki
Jump to: navigation, search

SetVehicleHealth
Server-Side Function

utilities-terminal.png Server-Side csharp.png C#

Sets how much health the vehicle engine has.

Note that if you are trying to use this to cripple a vehicle, the health will start to decrease quickly and ultimately explode. Keep setting the health continuously to keep it constant.

Syntax

void NAPI.Vehicle.SetVehicleHealth(Vehicle vehicle, float health);

Required Arguments

  • vehicle: parameter input should be in Vehicle 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.

The minimum value is -4000.0. At this state the engine is destroyed.

Usage example(s)

Example Description

NAPI.Vehicle.SetVehicleHealth(NetHandle vehicle, float health);

Changelog

Version Description
1.0 Release.

References