lua:getcarspeed

getCarSpeed

float speed = getCarSpeed(Vehicle car)

Получает скорость машины по ее хендлу.

Vehicle car Хендл машины

float speed Скорость машины

function main()
    while not isSampAvailable() do wait(100) end
    while true do wait(0)
      car = storeCarCharIsInNoSave(PLAYER_PED)
      if isCharInCar(PLAYER_PED,car) then
         speed = getCarSpeed(car)
	 local carSpeed = math.ceil(speed)
         printStyledString(carSpeed, 500, 7)
      end 
   end
end