From RAGE Multiplayer Wiki
Jump to navigation Jump to search

This function plays a planting bomb animation and plants a bomb in heading target location, you need to have the bomb equiped in your hands to work, otherwise nothing happens.


player.taskPlantBomb(x, y, z, heading);

Required Arguments

  • x: float
  • y: float
  • z: float
  • heading: float

Return value

  • Undefined


In the example below the player will plant when the X key is pressed:

mp.keys.bind(88, false, () => {
  if (mp.players.local.weapon !='weapon_stickybomb'))
    return`You need a sticky bomb to use planting feature!`);

  const { x, y, z } = mp.players.local.position;

  mp.players.local.taskPlantBomb(x, y, z, mp.players.local.heading);


See also