RedM Natives

GET_PED_SCRIPT_TASK_COMMAND

Gets the script task command currently assigned to the ped.

Hash0x84FE084
Runtime nameGetPedScriptTaskCommand
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

Hash GET_PED_SCRIPT_TASK_COMMAND(Ped ped);

Parameters

NameTypeDescription
pedPed

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

Cfx.re native reference

Gets the script task command currently assigned to the ped.

Usage

Lua
local retval = GetPedScriptTaskCommand(ped)

-- always works, by hash
local retval = Citizen.InvokeNative(0x84fe084, ped, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPedScriptTaskCommand(ped);

// by hash
const retval = Citizen.invokeNative('0x84fe084', ped, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x84fe084, ped);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.