# CFX::SET_PED_TO_RAGDOLL

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

## Signature

```c
void SET_PED_TO_RAGDOLL(Ped ped, int minTime, int maxTime, int ragdollType, BOOL bAbortIfInjured, BOOL bAbortIfDead, BOOL bForceScriptControl);
```

## Parameters

- `ped` (`Ped`) — The ped to ragdoll.
- `minTime` (`int`) — Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1.
- `maxTime` (`int`)
- `ragdollType` (`int`)
- `bAbortIfInjured` (`BOOL`) — unused
- `bAbortIfDead` (`BOOL`) — unused
- `bForceScriptControl` (`BOOL`)

## Returns

`void`

## Description

*Source: Cfx.re native reference*

p4/p5: Unusued in TU27

### Ragdoll Types

**0**: CTaskNMRelax
**1**: CTaskNMScriptControl: Hardcoded not to work in networked environments.
**Else**: CTaskNMBalance

**This is the server-side RPC native equivalent of the client native [SET_PED_TO_RAGDOLL](?\_0xAE99FB955581844A).**

## Usage

### Lua

```lua
SetPedToRagdoll(ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl)

-- always available, by hash
Citizen.InvokeNative(0x83cb5052, ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl)
```

### JavaScript

```js
SetPedToRagdoll(ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl);

// by hash
Citizen.invokeNative('0x83cb5052', ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl);
```

### C#

```csharp
Function.Call((Hash)0x83cb5052, ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl);
```

*Sources: Cfx.re native reference.*
