# CFX::GET_PED_SCRIPT_TASK_COMMAND

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

## Signature

```c
Hash GET_PED_SCRIPT_TASK_COMMAND(Ped ped);
```

## Parameters

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

## Returns

`Hash` — The script task command currently assigned to the ped. A value of 0x811E343C denotes no script task is assigned.

## Description

*Source: Cfx.re native reference*

Gets the script task command currently assigned to the ped.

## Usage

### Lua

```lua
local retval = GetPedScriptTaskCommand(ped)

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

### JavaScript

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

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

### C#

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

*Sources: Cfx.re native reference.*
