TasksClient

taskForceMotionState

TASK_FORCE_MOTION_STATE0x4F056E1AFFEF17AB

The GTA V native TASK_FORCE_MOTION_STATE of the TASK namespace, as LS:MP client scripts call it: the global function taskForceMotionState, in JavaScript and in Lua.

SignatureJavaScript
taskForceMotionState(ped: Ped, state: Hash, forceRestart: boolean): void
SignatureLua
taskForceMotionState(ped: Ped, state: Hash, forceRestart: boolean)

Usage

JavaScript
taskForceMotionState(ped, state, forceRestart);
Lua
taskForceMotionState(ped, state, forceRestart)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
stateHashnumberinteger
forceRestartBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

p2 always false

[30/03/2017] ins1de :

See forcePedMotionState

Reference

Namespace
Tasks TASK
In the game
void TASK_FORCE_MOTION_STATE(Ped ped, Hash state, BOOL forceRestart)
Hash
0x4F056E1AFFEF17AB

Open in the interactive natives reference