Player::setUsingActionMode: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
Line 9: Line 9:
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
This will clear melee stance almost instantly when attacking.
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
if (player.isUsingActionMode()) {
  player.setUsingActionMode(-1, -1, 1)
}
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Player_function_c}}
{{Player_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 21:48, 7 February 2019

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

Syntax

player.setUsingActionMode(p1, p2, action);

Required Arguments

  • p1: Boolean
  • p2: unknown (to be checked)
  • 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