- Documentation
- Server functions
- getVehicleTurnVelocity
Function
getVehicleTurnVelocity
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)