VehicleClient

setVehiclePetrolTankHealth

SET_VEHICLE_PETROL_TANK_HEALTH0x70DB57649FA8D0D8

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

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

Usage

JavaScript
setVehiclePetrolTankHealth(vehicle, health);
Lua
setVehiclePetrolTankHealth(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
-999.90002441406 appears to be minimum health, although nothing special occurs

Reference

Namespace
Vehicle VEHICLE
In the game
void SET_VEHICLE_PETROL_TANK_HEALTH(Vehicle vehicle, float health)
Hash
0x70DB57649FA8D0D8

Open in the interactive natives reference