Entity::position: Difference between revisions

From RAGE Multiplayer Wiki
Line 12: Line 12:
const playerPos = player.position
const playerPos = player.position
console.log(playerPos) // return e.g. {x: 1337, y: 228, z: 70}
console.log(playerPos) // return e.g. {x: 1337, y: 228, z: 70}
player.position = new Vector3(0.0, 0.0, 72.0);
player.position = new mp.Vector3(0.0, 0.0, 72.0);
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{Entity_block}}
{{Entity_block}}

Revision as of 02:16, 11 March 2018

This property is the position of a player.

Getter

  • Vector3

Setter

  • Vector3

Example

Server-Side

const playerPos = player.position
console.log(playerPos) // return e.g. {x: 1337, y: 228, z: 70}
player.position = new mp.Vector3(0.0, 0.0, 72.0);

See Also