# PED::SET_PED_TO_RAGDOLL

- **Hash:** `0xAE99FB955581844A`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `SetPedToRagdoll`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PED/SET_PED_TO_RAGDOLL

## Signature

```c
BOOL SET_PED_TO_RAGDOLL(Ped ped, int timeMin, int timeMax, int ragdollType, BOOL abortIfInjured, BOOL abortIfDead, const char* nmTaskMessageParameterName);
```

## Parameters

- `ped` (`Ped`)
- `timeMin` (`int`)
- `timeMax` (`int`)
- `ragdollType` (`int`)
- `abortIfInjured` (`BOOL`)
- `abortIfDead` (`BOOL`)
- `nmTaskMessageParameterName` (`const char*`)

## Returns

`BOOL`

## Description

nmTaskMessageParameterName: See physicstasks.ymt. Search for DraggedByCart or 0xD00820D7 (Used in R* SP Script marston8)

## Usage

### Lua

```lua
local retval = SetPedToRagdoll(ped, timeMin, timeMax, ragdollType, abortIfInjured, abortIfDead, nmTaskMessageParameterName)

-- always available, by hash
local retval = Citizen.InvokeNative(0xAE99FB955581844A, ped, timeMin, timeMax, ragdollType, abortIfInjured, abortIfDead, nmTaskMessageParameterName, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = SetPedToRagdoll(ped, timeMin, timeMax, ragdollType, abortIfInjured, abortIfDead, nmTaskMessageParameterName);

// by hash
const retval = Citizen.invokeNative('0xAE99FB955581844A', ped, timeMin, timeMax, ragdollType, abortIfInjured, abortIfDead, nmTaskMessageParameterName, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0xAE99FB955581844A, ped, timeMin, timeMax, ragdollType, abortIfInjured, abortIfDead, nmTaskMessageParameterName);
```

*Sources: alloc8or RDR3 NativeDB.*
