Jump to content

How to determine the direction of the player?


Recommended Posts

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.


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




mp.events.addCommand('dir', (player) => {


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...