getVehicleEngineHealth
GET_VEHICLE_ENGINE_HEALTH0xC45D23BAF168AAB8The 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.
getVehicleEngineHealth(vehicle: Vehicle): numbergetVehicleEngineHealth(vehicle: Vehicle): numberUsage
JavaScript
const value = getVehicleEngineHealth(vehicle);Lua
local value = getVehicleEngineHealth(vehicle)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
vehicle | Vehicle | number | integer |
Returns
float JavaScript number, Lua numberNotes
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