Перейти к содержанию

Controls::isControlPressed

Материал из RAGE MP Wiki Archive
Версия от 10:56, 14 мая 2024; imported>Shr0x (See also)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

index always is 2 for xbox 360 controller and razerblade

0, 1 and 2 used in the scripts. 0 is by far the most common of them.

Syntax

<syntaxhighlight lang="javascript">mp.game.controls.isControlPressed(inputGroup, control);</syntaxhighlight>

Required Arguments

Return value

  • Boolean

Example

<syntaxhighlight lang="javascript"> if(mp.game.controls.isControlPressed(27, 71)) {

 // Vehicle Control: Pressed W

} </syntaxhighlight>

See also