}
local przebiegfont = dxCreateFont("font.ttf", 10, false)
local przebiegfont2 = dxCreateFont("font.ttf", 25, false)
local blur = exports['blur']
addEventHandler("onClientRender", root, function()
if isPlayerMapVisible() then return end
local pojazd = getPedOccupiedVehicle(localPlayer)
if pojazd then
if isBike[getElementModel(pojazd)] then return end
local sprawdzpaliwo = tonumber(getElementData(pojazd, "vehicle:fuel"))
local sprawdzprzebieg = tonumber(getElementData(pojazd, "vehicle:mileage")) or 000
local id = getElementData(pojazd, "vehicle:id") or "---"
local przebieg = math.floor(sprawdzprzebieg) or 0
local premium = getElementData(localPlayer, "player:premium")
if #tostring(przebieg) == 1 then przebieg = "0000"..przebieg
elseif #tostring(przebieg) == 2 then przebieg = "000"..przebieg
elseif #tostring(przebieg) == 3 then przebieg = "00"..przebieg
elseif #tostring(przebieg) == 4 then przebieg = "0"..przebieg
elseif #tostring(przebieg) == 5 then przebieg = ""..przebieg
elseif #tostring(przebieg) == 8 then przebieg = przebieg end
local paliwo = math.floor(sprawdzpaliwo) or 60
local sx, sy, sz = getElementVelocity(pojazd)
local predkosc = math.ceil(((sx^2+sy^2+sz^2)^(0.5)) * 161)
blur:dxDrawBluredRectangle(1127/1440*sw, 600/715*sh, 290/1440*sw, 125/900*sh, tocolor(100,100,100, 255), false)
blur:dxDrawBluredRectangle(screenW * 0.7826, screenH * 0.7995, screenW * 0.2013, screenH * 0.0326, tocolor(100,100,100, 255), false)
if premium then
dxDrawRectangle(screenW * 0.7811, screenH * 0.7995, screenW * 0.0015, screenH * 0.0326, tocolor(219,178,52,255), false)
dxDrawRectangle(1125/1440*sw, 600/715*sh, 2, 125/900*sh, tocolor(219,178,52,255), false)
dxDrawText(""..predkosc.." km/h", 1125/1440*sw, 1740/985*sh, 1424/1440*sw, 24/900*sh, tocolor(219,178,52,255), 1, przebiegfont2, "center", "center", false, false, false, false, false)
else
dxDrawRectangle(screenW * 0.7811, screenH * 0.7995, screenW * 0.0015, screenH * 0.0326, tocolor(255,255,255,255), false)
dxDrawRectangle(1125/1440*sw, 600/715*sh, 2, 125/900*sh, tocolor(255,255,255,255), false)
dxDrawText(""..predkosc.." km/h", 1125/1440*sw, 1740/985*sh, 1424/1440*sw, 24/900*sh, tocolor(255,255,255,255), 1, przebiegfont2, "center", "center", false, false, false, false, false)
end
dxDrawText(""..przebieg.."km", 1125/1440*sw, 1660/900*sh, 1424/1440*sw, 40/900*sh, tocolor(255,255,255,255), 1, przebiegfont, "center", "center", false, false, false, false, false)
if paliwo <= 100 then
dxDrawRectangle(screenW * 0.7848, screenH * 0.8034, (screenW * 0.1962)*(paliwo/100), screenH * 0.0234, tocolor(115, 138, 67, 255), false)
end
if paliwo <= 50 then
dxDrawRectangle(screenW * 0.7848, screenH * 0.8034, (screenW * 0.1962)*(paliwo/100), screenH * 0.0234, tocolor(197, 208, 42, 255), false)
end
if paliwo <= 25 then
dxDrawRectangle(screenW * 0.7848, screenH * 0.8034, (screenW * 0.1962)*(paliwo/100), screenH * 0.0234, tocolor(239, 68, 52, 255), false)
end
dxDrawText(""..paliwo.."L", screenW * 0.7848, screenH * 0.8034, screenW * 0.9810, screenH * 0.8268, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false)
if isElementFrozen(pojazd) == true then
dxDrawText("» R?CZNY", 970/1440*sw, 1660/900*sh, 1424/1440*sw, 40/900*sh, tocolor(255,0,0,255), 1, "clear-normal", "center", "center", false, false, false, false, false)
end
end