The Lab
PED native

FORCE_PED_MOTION_STATE

returns BOOL5 paramsbuild 1207

Forces ped into the motion state motionStateHash, such as walking or running, returning true on success.

Signature

C
BOOL FORCE_PED_MOTION_STATE(Ped ped, Hash motionStateHash, BOOL p2, int p3, BOOL p4); // 0xF28965D04F570DCA b1207

Parameters

#NameType
1pedPed
2motionStateHashHash
3p2BOOL
4p3int
5p4BOOL

Facts

Facts about FORCE_PED_MOTION_STATE
Name
FORCE_PED_MOTION_STATE
Hash
0xF28965D04F570DCA
Namespace
Returns
BOOL
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0xF28965D04F570DCA, -- FORCE_PED_MOTION_STATE
  PlayerPedId(), -- Ped ped
  GetHashKey("name"), -- Hash motionStateHash
  false, -- BOOL p2
  0, -- int p3
  false -- BOOL p4
)
if result then
  -- ...
end
JavaScript
const result = Citizen.invokeNative("0xF28965D04F570DCA", // FORCE_PED_MOTION_STATE
  PlayerPedId(), // Ped ped
  GetHashKey("name"), // Hash motionStateHash
  false, // BOOL p2
  0, // int p3
  false, // BOOL p4
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
bool result = Function.Call<bool>((Hash)0xF28965D04F570DCA, // FORCE_PED_MOTION_STATE
  API.PlayerPedId(), // Ped ped
  (uint)API.GetHashKey("name"), // Hash motionStateHash
  false, // BOOL p2
  0, // int p3
  false // BOOL p4
);
All PED natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.