RedM Natives

CLEAR_PED_TASKS

Clear a ped's tasks. Stop animations and other tasks created by scripts.

Hash0xDE3316AB
Runtime nameClearPedTasks
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void CLEAR_PED_TASKS(Ped ped);

Parameters

NameTypeDescription
pedPed

Ped id. Use PlayerPedId() for your own character.

Returns void

Description

Cfx.re native reference

Clear a ped's tasks. Stop animations and other tasks created by scripts.

This is the server-side RPC native equivalent of the client native CLEAR_PED_TASKS.

Usage

Lua
ClearPedTasks(ped)

-- always works, by hash
Citizen.InvokeNative(0xde3316ab, ped)
JavaScript and C#
JavaScript
ClearPedTasks(ped);

// by hash
Citizen.invokeNative('0xde3316ab', ped);
C#
Function.Call((Hash)0xde3316ab, ped);

Sources

Cfx.re native reference

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