VehicleClient

setVehicleEngineHealth

SET_VEHICLE_ENGINE_HEALTH0x45F6D8EEF34ABEF1

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

SignatureJavaScript
setVehicleEngineHealth(vehicle: Vehicle, health: number): void
SignatureLua
setVehicleEngineHealth(vehicle: Vehicle, health: number)

Usage

JavaScript
setVehicleEngineHealth(vehicle, health);
Lua
setVehicleEngineHealth(vehicle, health)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
healthfloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

1000 is max health
Begins leaking gas at around 650 health
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
void SET_VEHICLE_ENGINE_HEALTH(Vehicle vehicle, float health)
Hash
0x45F6D8EEF34ABEF1

Open in the interactive natives reference