Skip to main content

Mobile::moveFinger

Client-side function

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);
});