Witam, ucz? si? lua pomo?e mi kto? dorobi? paliwo do tego licznika?
Pr?bowa?em z dxdrawtext ale mi nie wysz?o.
[code]local scx,scy = guiGetScreenSize()
local px = scx/1920
local sizeX,sizeY = 350*px,350*px
local posX,posY = scx-sizeX,scy-sizeY
local font1 = dxCreateFont( "files/AEROMATICSBOLD.ttf",17*px )
local font2 = dxCreateFont( "files/AEROMATICSBOLDITALIC.ttf" )
local font3 = dxCreateFont( "files/AEROMATICSITALIC.ttf",50*px )
local font4 = dxCreateFont( "files/AEROMATICSITALIC.ttf",18*px )
function math.lerp(a, b, k)
local result = a * (1-k) + b * k
if result >= b then
result = b
elseif result <= a then
result = a
end
return result
end
local alpha = 255
local side = true
local pulsing = true
function drawSpeedometer()
local veh = getPedOccupiedVehicle(localPlayer)
if veh then
local speedx, speedy, speedz = getElementVelocity ( veh )
local actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5)
local kmh = math.floor(actualspeed * 180)
local rotation = math.lerp(-152,90,kmh/300)
if rotation >= 90 then rotation = math.random(88,92) end
local gear = getVehicleCurrentGear( veh )
if gear == 0 then
if kmh <= 1 then
gear = "N"
else
gear = "R"
end
elseif gear == 1 then
if kmh <= 2 then
gear = "N"
end
end