RedM Natives

GET_PED_CAUSE_OF_DEATH

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

Hash0x16FFE42AB2D2DC59
Runtime nameGetPedCauseOfDeath
NamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x16FFE42AB2D2DC59

Signature

Hash GET_PED_CAUSE_OF_DEATH(Ped ped);

Parameters

NameTypeDescription
pedPed—

Returns Hash

Description

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

Usage

Lua
local retval = GetPedCauseOfDeath(ped)

-- always works, by hash
local retval = Citizen.InvokeNative(0x16FFE42AB2D2DC59, ped, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPedCauseOfDeath(ped);

// by hash
const retval = Citizen.invokeNative('0x16FFE42AB2D2DC59', ped, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x16FFE42AB2D2DC59, ped);

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.