dodaj mi do tego moje fonty z innego folderu sieka-dxlib i zmień na tych tekstach w skrypcie na fonty "Onest-Regular"

local markerPos = Vector3(241.12, 30.47, 2.58-1)
local spawnPos = Vector3(250.67, 29.30, 2.58)
local camDist = 6
local camHeight = 3
local camTime = 1000
local vehicleFadeTime = 800

local vehicleModels = {411, 451, 602, 560, 562, 559, 506, 541, 415, 429}

local guiVisible = false local currentVehicle = nil
local nextVehicle = nil
local currentSlot = nil
local camAnim = { active = false } local vehicleAnim = { active = false }

local function spawnVehicle(model) if vehicleAnim.active then return end

nextVehicle = createVehicle(model, spawnPos.x, spawnPos.y, spawnPos.z)
setElementFrozen(nextVehicle, true)
setVehicleDamageProof(nextVehicle, true)
setElementAlpha(nextVehicle, 0) 

vehicleAnim = {
    active = true,
    startTick = getTickCount(),
    oldVehicle = currentVehicle,
    newVehicle = nextVehicle
}
end

local sw, sh = guiGetScreenSize() local w, h = 396, 804 local slotW, slotH = 305, 47 local slotX = sw/8 - w/2 + 45 local slotY = sh/2 - h/2 + 162 local slotSpacing = 10 local slotCount = 10

local guiMarker = createMarker(markerPos.x, markerPos.y, markerPos.z, "cylinder", 1.5, 255, 255, 255, 120)

addEventHandler("onClientMarkerHit", guiMarker, function(hit) if hit == localPlayer then guiVisible = true showCursor(true)

    if not currentVehicle and not vehicleAnim.active then
        local firstModel = vehicleModels[1]
        currentVehicle = createVehicle(firstModel, spawnPos.x, spawnPos.y, spawnPos.z)
        setElementFrozen(currentVehicle, true)
        setVehicleDamageProof(currentVehicle, true)
        currentSlot = 1
        moveCameraToVehicle()
    end
end
end)

addEventHandler("onClientKey", root, function(btn, press) if btn == "backspace" and press and guiVisible then guiVisible = false showCursor(false) currentSlot = nil camAnim.active = false setCameraTarget(localPlayer)

    if currentVehicle and isElement(currentVehicle) then
        destroyElement(currentVehicle)
        currentVehicle = nil
    end
    
    if nextVehicle and isElement(nextVehicle) then
        destroyElement(nextVehicle)
        nextVehicle = nil
    end
    
    vehicleAnim.active = false
end
end)

local function moveCameraToVehicle() local targetVehicle = nextVehicle or currentVehicle if not targetVehicle then return end

local sx, sy, sz, slx, sly, slz = getCameraMatrix()
local vx, vy, vz = getElementPosition(targetVehicle)

local lookX, lookY, lookZ = vx, vy, vz + 0.5

local angle = math.rad(getElementRotation(targetVehicle))
local camX = vx - math.sin(angle) * camDist
local camY = vy + math.cos(angle) * camDist
local camZ = vz + camHeight

camAnim = {
    active = true,
    startTick = getTickCount(),
    from = {sx, sy, sz, slx, sly, slz},
    to = {camX, camY, camZ, lookX, lookY, lookZ}
}
end

local function rotateVehicle(vehicle) if not vehicle or not isElement(vehicle) then return end

local _, _, rz = getElementRotation(vehicle)
setElementRotation(vehicle, 0, 0, rz + 0.3) 
end

addEventHandler("onClientRender", root, function() if camAnim.active then local now = getTickCount() local prog = (now - camAnim.startTick) / camTime if prog >= 1 then prog = 1 camAnim.active = false end

    local fx, fy, fz = interpolateBetween(
        camAnim.from[1], camAnim.from[2], camAnim.from[3],
        camAnim.to[1], camAnim.to[2], camAnim.to[3],
        prog, "OutQuad"
    )
    local lx, ly, lz = interpolateBetween(
        camAnim.from[4], camAnim.from[5], camAnim.from[6],
        camAnim.to[4], camAnim.to[5], camAnim.to[6],
        prog, "OutQuad"
    )
    setCameraMatrix(fx, fy, fz, lx, ly, lz)
end

if vehicleAnim.active then
    local now = getTickCount()
    local prog = (now - vehicleAnim.startTick) / vehicleFadeTime
    
    if prog < 0.5 then
        local alpha = interpolateBetween(255, 0, 0, 0, 0, 0, prog*2, "OutQuad")
        if vehicleAnim.oldVehicle and isElement(vehicleAnim.oldVehicle) then
            setElementAlpha(vehicleAnim.oldVehicle, alpha)
        end
    else
        local alpha = interpolateBetween(0, 0, 0, 255, 0, 0, (prog-0.5)*2, "InQuad")
        if vehicleAnim.newVehicle and isElement(vehicleAnim.newVehicle) then
            setElementAlpha(vehicleAnim.newVehicle, alpha)
        end
    end
    
    if prog >= 1 then
        if vehicleAnim.oldVehicle and isElement(vehicleAnim.oldVehicle) then
            destroyElement(vehicleAnim.oldVehicle)
        end
        
        currentVehicle = vehicleAnim.newVehicle
        vehicleAnim.active = false
    end
end

if currentVehicle and isElement(currentVehicle) then
    rotateVehicle(currentVehicle)
end

if nextVehicle and isElement(nextVehicle) then
    rotateVehicle(nextVehicle)
end

if not guiVisible then return end

dxDrawImage(sw/8 - w/2, sh/2 - h/2, w, h, "img/bg.png")

local cx, cy = getCursorPosition()
if cx and cy then
    cx, cy = cx * sw, cy * sh
end

local hoveredSlot = nil

for i = 0, slotCount - 1 do
    local x = slotX
    local y = slotY + i * (slotH + slotSpacing)

    local isHover = false
    if cx and cy then
        if cx >= x and cx <= x + slotW and cy >= y and cy <= y + slotH then
            isHover = true
            hoveredSlot = i + 1  
        end
    end

    if isHover then
        dxDrawImage(x, y, slotW, slotH, "img/rectangle.png", 0, 0, 0, tocolor(255, 255, 255, 255))
    end
    
    local vehicleName = getVehicleNameFromModel(vehicleModels[i+1])
    if vehicleName then
        dxDrawText(vehicleName, x + 10, y + slotH/2 - 10, x + slotW, y + slotH/2 + 10, 
                   tocolor(255, 255, 255, 255), 1.2, "default", "left", "center")
    end
end

if hoveredSlot and hoveredSlot ~= currentSlot and not vehicleAnim.active then
    currentSlot = hoveredSlot
    spawnVehicle(vehicleModels[currentSlot])  
    moveCameraToVehicle()  
end