Entity::position: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 8: | Line 8: | ||
== Example == | == Example == | ||
{{ | {{ServersideCode| | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
const playerPos = player.position | const playerPos = player.position | ||
Revision as of 10:18, 30 April 2019
This property gets/sets the entity position.
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);