PlayerClient

simulatePlayerInputGait

SIMULATE_PLAYER_INPUT_GAIT0x477D5D63E63ECA5D

The GTA V native SIMULATE_PLAYER_INPUT_GAIT of the PLAYER namespace, as LS:MP client scripts call it: the global function simulatePlayerInputGait, in JavaScript and in Lua.

SignatureJavaScript
simulatePlayerInputGait(
  player: Player,
  amount: number,
  gaitType: number,
  speed: number,
  p4: boolean,
  p5: boolean,
  p6: any
): void
SignatureLua
simulatePlayerInputGait(
  player: Player,
  amount: number,
  gaitType: integer,
  speed: number,
  p4: boolean,
  p5: boolean,
  p6: any
)

Usage

JavaScript
simulatePlayerInputGait(player, amount, gaitType, speed, p4, p5, p6);
Lua
simulatePlayerInputGait(player, amount, gaitType, speed, p4, p5, p6)

Parameters

ParameterTypeJavaScriptLua
playerPlayernumberinteger
amountfloatnumbernumber
gaitTypeintnumberinteger
speedfloatnumbernumber
p4BOOLbooleanboolean
p5BOOLbooleanboolean
p6Anyanyany

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.

This is to make the player walk without accepting input from INPUT.

gaitType is in increments of 100s. 2000, 500, 300, 200, etc.

p4 is always 1 and p5 is always 0.

C# Example :

Function.Call(Hash.SIMULATE_PLAYER_INPUT_GAIT, Game.Player, 1.0f, 100, 1.0f, 1, 0); //Player will go forward for 100ms

Reference

Namespace
Player PLAYER
In the game
void SIMULATE_PLAYER_INPUT_GAIT(Player player, float amount, int gaitType, float speed, BOOL p4, BOOL p5, Any p6)
Hash
0x477D5D63E63ECA5D

Open in the interactive natives reference