VehicleClient

getVehicleCauseOfDestruction

GET_VEHICLE_CAUSE_OF_DESTRUCTION0xE495D1EF4C91FD20

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

SignatureJavaScript
getVehicleCauseOfDestruction(vehicle: Vehicle): Hash
SignatureLua
getVehicleCauseOfDestruction(vehicle: Vehicle): Hash

Usage

JavaScript
const hash = getVehicleCauseOfDestruction(vehicle);
Lua
local hash = getVehicleCauseOfDestruction(vehicle)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger

Returns

Hash JavaScript number, Lua integer

A game hash. Natives return it unsigned (0 to 4294967295), the value lsmp.hash gives. As an argument, the signed and unsigned forms of a hash are the same value.

Notes

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

iVar3 = get_vehicle_cause_of_destruction(uLocal_248[iVar2]);
if (iVar3 == joaat("weapon_stickybomb"))
{
  func_171(726);
  iLocal_260 = 1;
}

Reference

Namespace
Vehicle VEHICLE
In the game
Hash GET_VEHICLE_CAUSE_OF_DESTRUCTION(Vehicle vehicle)
Hash
0xE495D1EF4C91FD20

Open in the interactive natives reference