# CFX::GET_PED_SOURCE_OF_DEATH

- **Hash:** `0x84ADF9EB`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetPedSourceOfDeath`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_PED_SOURCE_OF_DEATH

## Signature

```c
Entity GET_PED_SOURCE_OF_DEATH(Ped ped);
```

## Parameters

- `ped` (`Ped`) — The target ped

## Returns

`Entity` — The entity id. Returns 0 if the ped has no killer.

## Description

*Source: Cfx.re native reference*

Get the entity that killed the ped. This native is used server side when using OneSync.

## Usage

### Lua

```lua
local retval = GetPedSourceOfDeath(ped)

-- always available, by hash
local retval = Citizen.InvokeNative(0x84adf9eb, ped, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetPedSourceOfDeath(ped);

// by hash
const retval = Citizen.invokeNative('0x84adf9eb', ped, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x84adf9eb, ped);
```

*Sources: Cfx.re native reference.*
