setElementAngularVelocity
Shared
Sets an element's turning speed.
bool setElementAngularVelocity(element element, float x, y, z)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | The element. On a client, a ped, player, vehicle or object; on the server, a vehicle only. |
| x, y, z | float | Turning speed about each axis, per simulation step. |
Returns
true if it was set, false if the element does not turn.
Example
local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
setElementAngularVelocity(vehicle, 0, 0, 0.2)
end