ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setVehicleTurnVelocity

Function

setVehicleTurnVelocity

ServerVehiclesIdentical to MTA:SA

Sets a vehicle's rotation speed around the x, y, z axes, e.g. to make a car spin. This is the same function as setElementAngularVelocity.

Syntax

bool setVehicleTurnVelocity(vehicle element, float x, float y, float z)

Arguments

elementvehicle
The vehicle.
xfloat
Rotation speed around the X axis.
yfloat
Rotation speed around the Y axis.
zfloat
Rotation speed around the Z axis (horizontal).

Returns

true on success.

Example

addCommandHandler("bak", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then setVehicleTurnVelocity(vehicle, 0, 0, 0.3) end
end)

See also