GET_PED_SOURCE_OF_DEATH
Get the entity that killed the ped.
Signature
Entity GET_PED_SOURCE_OF_DEATH(Ped ped);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | The target ped |
Returns Entity — The entity id. Returns 0 if the ped has no killer.
Description
Get the entity that killed the ped. This native is used server side when using OneSync.
Usage
local retval = GetPedSourceOfDeath(ped)
-- always works, by hash
local retval = Citizen.InvokeNative(0x84adf9eb, ped, Citizen.ResultAsInteger())JavaScript and C#
const retval = GetPedSourceOfDeath(ped);
// by hash
const retval = Citizen.invokeNative('0x84adf9eb', ped, Citizen.returnResultAnyway(), Citizen.resultAsInteger());int retval = Function.Call<int>((Hash)0x84adf9eb, ped);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.