Jump to content

XtReLL

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by XtReLL

  1. Good day, friends.

    Please tell me if it is possible and how to determine the direction of the player.

    In the documentation, I found only the definition of the camera direction(https://wiki.rage.mp/index.php?title=Camera::getDirection), but I would like to know how to determine where the player model is looking.

    I attach the implementation of determining the direction of the camera.

    client-side

    let getDirection = function () {
      const camera = mp.cameras.new("gameplay");
      let position = camera.getDirection();
      console.log(position);
      mp.gui.chat.push(`Direction: X:${position.x} Y:${position.y} Z:${position.z}`);
    }
    mp.events.add('dir', getDirection)

     

     

    server-side

    mp.events.addCommand('dir', (player) => {
      player.call("dir");
    });


     

×
×
  • Create New...