function licznikCyfrowy ( )
if isPedInVehicle (localPlayer) == false then return end
sx, sy, sz = getElementVelocity (getPedOccupiedVehicle(localPlayer))
predkosc = math.floor(((sx^2 + sy^2 + sz^2)^(0.5))*180)
dxDrawText(""..tostring(predkosc).."", x, y, x, y, tocolor(255, 255, 255, 255), 1, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText ( "KM/H", x, y, x, y, tocolor(255, 255, 255, 255), 1 , "default-bold", "center", "center", false, false, false, false, false)
end
addEventHandler("onClientPreRender", root, licznikCyfrowy)