Player::simulatePlayerInputGait: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is to make the player walk without accepting input from INPUT.<br><br>gaitType is in increments of 100s. 2000, 500, 300, 200, etc.<br><br>p4 is always 1 and p5 is always 0.<br><br>C# Example :<br><br>Function.Call(Hash.SIMULATE_PLAYER_INPUT_GAIT, Game.Player, 1.0f, 100, 1.0f, 1, 0); //Player will go forward for 100ms
This is to make the player walk without accepting input from INPUT.<br><br>gaitType is in increments of 100s. 2000, 500, 300, 200, etc.<br><br>p4 is always 1 and p5 is always 0.<br><br>C# Example :<br><br>Function.Call(Hash.SIMULATE_PLAYER_INPUT_GAIT, Game.Player, 1.0f, 100, 1.0f, 1, 0); //Player will go forward for 100ms
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.simulatePlayerInputGait(amountgaitTypespeedp4p5);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.player.simulatePlayerInputGait(speed, time, heading, headingRelativeToPed, notCancellable);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''amount:''' float
*'''gaitType:''' int
*'''speed:''' float
*'''speed:''' float
*'''p4:''' Boolean
*'''time:''' int
*'''p5:''' Boolean
*'''heading:''' float
*'''headingRelativeToPed:''' Boolean
*'''notCancellable:''' Boolean
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Player_function_c}}
{{Player_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 19:47, 8 December 2020

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

Syntax

mp.game.player.simulatePlayerInputGait(speed, time, heading, headingRelativeToPed, notCancellable);

Required Arguments

  • speed: float
  • time: int
  • heading: float
  • headingRelativeToPed: Boolean
  • notCancellable: Boolean

Return value

  • Undefined

Example

// todo

See also