Vehicle::rotation: Difference between revisions
(Created page with "This property using for getting or setting vehicle rotation. '''Note: this property is read-only.''' == Example == <source lang="javascript"> let rotation = vehicle.rotation...") |
No edit summary |
||
| Line 1: | Line 1: | ||
This property using for getting or setting vehicle rotation. | This property using for getting or setting vehicle rotation. | ||
''' | ==Getter== | ||
* '''<span style="color:#008017>Vector3</span>''' | |||
==Setter== | |||
* '''<span style="color:#008017>Vector3</span>''' | |||
== Example == | == Example == | ||
< | <div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;"> | ||
let rotation = vehicle.rotation | <div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div> | ||
vehicle.rotation = new mp.Vector3(0, 0, 90) | <syntaxhighlight lang="javascript"> | ||
</ | let rotation = vehicle.rotation; | ||
vehicle.rotation = new mp.Vector3(0, 0, 90); | |||
console.log(vehicle.rotation.x, vehicle.rotation.y, vehicle.rotation.z); | |||
</syntaxhighlight> | |||
</div> | |||
==See Also== | |||
{{Entity_block}} | |||
Revision as of 15:32, 7 September 2017
This property using for getting or setting vehicle rotation.
Getter
- Vector3
Setter
- Vector3
Example
Server-Side
let rotation = vehicle.rotation;
vehicle.rotation = new mp.Vector3(0, 0, 90);
console.log(vehicle.rotation.x, vehicle.rotation.y, vehicle.rotation.z);