getPedSourceOfDeath
GET_PED_SOURCE_OF_DEATH0x93C8B64DEB84728CThe GTA V native GET_PED_SOURCE_OF_DEATH of the PED namespace, as LS:MP client scripts call it: the global function getPedSourceOfDeath, in JavaScript and in Lua.
getPedSourceOfDeath(ped: Ped): EntitygetPedSourceOfDeath(ped: Ped): EntityUsage
JavaScript
const entity = getPedSourceOfDeath(ped);Lua
local entity = getPedSourceOfDeath(ped)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
Returns
Entity JavaScript number, Lua integerGame handle of an entity: a ped, a vehicle or an object. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Returns the Entity (Ped, Vehicle, or ?Object?) that killed the 'ped'
Is best to check if the Ped is dead before asking for its killer.
Reference
- Namespace
- Ped PED
- In the game
Entity GET_PED_SOURCE_OF_DEATH(Ped ped)- Hash
0x93C8B64DEB84728C- Formerly
_GET_PED_KILLER