# CFX::GET_PED_SCRIPT_TASK_STAGE

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

## Signature

```c
int GET_PED_SCRIPT_TASK_STAGE(Ped ped);
```

## Parameters

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

## Returns

`int` — The stage of the ped's scripted task. A value of 3 denotes no script task is assigned.

## Description

*Source: Cfx.re native reference*

Gets the stage of the peds scripted task.

## Usage

### Lua

```lua
local retval = GetPedScriptTaskStage(ped)

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

### JavaScript

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

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

### C#

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

*Sources: Cfx.re native reference.*
