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

Function

getVehicleTurnVelocity

ServerVehiclesIdentical to MTA:SA

Returns a vehicle's rotation speed around the x, y, z axes. This is the same function as getElementAngularVelocity.

Syntax

float, float, float getVehicleTurnVelocity(vehicle element)

Arguments

elementvehicle
The vehicle.

Returns

Rotation speed x, y, z.

Example

addCommandHandler("obrot", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if vehicle then
        local _, _, rz = getVehicleTurnVelocity(vehicle)
        outputChatBox("Obrot: " .. rz, player)
    end
end)

See also