VehicleClient

getVehicleEngineHealth

GET_VEHICLE_ENGINE_HEALTH0xC45D23BAF168AAB8

The GTA V native GET_VEHICLE_ENGINE_HEALTH of the VEHICLE namespace, as LS:MP client scripts call it: the global function getVehicleEngineHealth, in JavaScript and in Lua.

SignatureJavaScript
getVehicleEngineHealth(vehicle: Vehicle): number
SignatureLua
getVehicleEngineHealth(vehicle: Vehicle): number

Usage

JavaScript
const value = getVehicleEngineHealth(vehicle);
Lua
local value = getVehicleEngineHealth(vehicle)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger

Returns

float JavaScript number, Lua number

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Returns 1000.0 if the function is unable to get the address of the specified vehicle or if it's not a vehicle.

Minimum: -4000
Maximum: 1000

-4000: Engine is destroyed
0 and below: Engine catches fire and health rapidly declines
300: Engine is smoking and losing functionality
1000: Engine is perfect

Reference

Namespace
Vehicle VEHICLE
In the game
float GET_VEHICLE_ENGINE_HEALTH(Vehicle vehicle)
Hash
0xC45D23BAF168AAB8

Open in the interactive natives reference