RedM Natives

FORCE_PED_MOTION_STATE

Hash0xF28965D04F570DCA
Runtime nameForcePedMotionState
NamespacePED
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xF28965D04F570DCA

Signature

BOOL FORCE_PED_MOTION_STATE(Ped ped, Hash motionStateHash, BOOL p2, int p3, BOOL p4);

Parameters

NameTypeDescription
pedPed—
motionStateHashHash—
p2BOOL—
p3int—
p4BOOL—

Returns BOOL

Description

motionStateHash: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/CPedMotionStates__eMotionState

Usage

Lua
local retval = ForcePedMotionState(ped, motionStateHash, p2, p3, p4)

-- always works, by hash
local retval = Citizen.InvokeNative(0xF28965D04F570DCA, ped, motionStateHash, p2, p3, p4, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = ForcePedMotionState(ped, motionStateHash, p2, p3, p4);

// by hash
const retval = Citizen.invokeNative('0xF28965D04F570DCA', ped, motionStateHash, p2, p3, p4, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0xF28965D04F570DCA, ped, motionStateHash, p2, p3, p4);
  • Hash parameters: the named function also accepts a string and hashes it for you; Citizen.InvokeNative needs the number — pass joaat("name") or a backtick literal like `name`.

Enums and flags

Sources

alloc8or RDR3 NativeDB

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