Player::setUsingActionMode: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
 
Line 1: Line 1:
p2 is usually -1 in the scripts. action is either 0 or 'DEFAULT_ACTION'.
p2 is usually -1 in the scripts. action is either 0 or 'DEFAULT_ACTION'.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.setUsingActionMode(p1, p2, action);</syntaxhighlight>
<syntaxhighlight lang="javascript">player.setUsingActionMode(state, timeout, action);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''p1:''' Boolean
*'''state:''' Boolean
*'''p2:''' unknown (to be checked)
*'''timeout:''' Number
*'''action:''' String
*'''action:''' String
===Return value===
===Return value===

Latest revision as of 13:14, 26 May 2020

p2 is usually -1 in the scripts. action is either 0 or 'DEFAULT_ACTION'.

Syntax

player.setUsingActionMode(state, timeout, action);

Required Arguments

  • state: Boolean
  • timeout: Number
  • action: String

Return value

  • Undefined

Example

This will clear melee stance almost instantly when attacking.

if (player.isUsingActionMode()) {
   player.setUsingActionMode(-1, -1, 1)
}

See also