Mobile::moveFinger

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Client-Side
Function

Js.png JavaScript



Moves the player's finger while holding the phone.

Movements:

  • 1 - Swipe Up
  • 2 - Swipe Down
  • 3 - Swipe Left
  • 4 - Swipe Right
  • 5 - Button Press


Syntax

mp.game.mobile.moveFinger(direction);

Required Arguments

  • direction: Int

Return value

  • Undefined

Example

Client-Side
mp.keys.bind(0x26, true, function() {   // Up Arrow
    mp.game.mobile.moveFinger(1);
});

mp.keys.bind(0x28, true, function() {   // Down Arrow
    mp.game.mobile.moveFinger(2);
});

mp.keys.bind(0x27, true, function() {   // Right Arrow
    mp.game.mobile.moveFinger(4);
});

mp.keys.bind(0x25, true, function() {   // Left Arrow
    mp.game.mobile.moveFinger(3);
});

mp.keys.bind(0x0D, true, function() {   // Enter
    mp.game.mobile.moveFinger(5);
});

See also