PedClient

getPedCauseOfDeath

GET_PED_CAUSE_OF_DEATH0x16FFE42AB2D2DC59

The GTA V native GET_PED_CAUSE_OF_DEATH of the PED namespace, as LS:MP client scripts call it: the global function getPedCauseOfDeath, in JavaScript and in Lua.

SignatureJavaScript
getPedCauseOfDeath(ped: Ped): Hash
SignatureLua
getPedCauseOfDeath(ped: Ped): Hash

Usage

JavaScript
const hash = getPedCauseOfDeath(ped);
Lua
local hash = getPedCauseOfDeath(ped)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger

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.

Returns the hash of the weapon/model/object that killed the ped.

Reference

Namespace
Ped PED
In the game
Hash GET_PED_CAUSE_OF_DEATH(Ped ped)
Hash
0x16FFE42AB2D2DC59

Open in the interactive natives reference