Controls::isControlPressed: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(4 intermediate revisions by one other user not shown)
Line 3: Line 3:
<syntaxhighlight lang="javascript">mp.game.controls.isControlPressed(inputGroup, control);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.controls.isControlPressed(inputGroup, control);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''inputGroup:''' int
*'''inputGroup:''' {{RageType|Int}} ([[InputGroup|Input Groups]])
*'''control:''' int
*'''control:''' {{RageType|Int}} ([[Controls|Controls]])
 
===Return value===
===Return value===
*'''Boolean'''
*'''Boolean'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
if(mp.game.controls.isControlPressed(27, 71)) {
  // Vehicle Control: Pressed W
}
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Controls_s_function_c}}
{{Controls_functions_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 10:56, 14 May 2024