Jump to content

Error loading @'dxDrawImage'


saluta

Recommended Posts

Hello peoples, help me please !

Spoiler

function drawRadar()
    setPlayerHudComponentVisible("radar", false)
    if disableGTASAhealth then setPlayerHudComponentVisible("health", false) end
    if disableGTASAarmor then setPlayerHudComponentVisible("armour", false) end
    if disableGTASAoxygen then setPlayerHudComponentVisible("breath", false) end
    if (not isPlayerMapVisible()) then
        local mW, mH = dxGetMaterialSize(rt)
        local x, y = getElementPosition(localPlayer)
        local X, Y = mW/2 -(x/(6000/worldW)), mH/2 +(y/(6000/worldH))
        local camX,camY,camZ = getElementRotation(getCamera())
        dxSetRenderTarget(rt, true)
        if alwaysRenderMap or getElementInterior(localPlayer) == 0 then
            dxDrawRectangle(0, 0, mW, mH, 0xFF7CA7D1) --render background
            dxDrawImage(X - worldW/2, mH/5 + (Y - worldH/2), worldW, worldH, "image/world.jpg", camZ, (x/(6000/worldW)), -(y/(6000/worldH)), tocolor(255, 255, 255, 255))
        end
        dxSetRenderTarget()
        dxDrawRectangle((10)*xFactor, sy-((200+10))*yFactor, (300)*xFactor, (185)*yFactor, tocolor(45, 45, 45, 255))
        local playerHealth = math.floor( getElementHealth( localPlayer ))
        local playerArmor = math.floor( getPedArmor( localPlayer ))
        local playerOxygen = math.floor( getPedOxygenLevel( localPlayer ))
         if ( playerHealth  <= 50) then
                HP_Colour = tocolor(200, 0, 0, 190)
                HP_Alpha = tocolor(200, 0, 0, 100)
            else
                HP_Colour = tocolor(102, 204, 102, 190)
                HP_Alpha = tocolor(102, 204, 102, 100)                
            end
            if ( playerHealth >= 101 ) then
                maxHealth = 200
            else
                maxHealth = 100
            end
        dxDrawRectangle(23.5*sW, 700.5*sH, 130.5*sW, 9.2*sH, HP_Alpha)        
        dxDrawRectangle(156.6*sW, 700.5*sH, 65*sW, 9.2*sH, tocolor(0, 102, 255, 100))
        dxDrawRectangle(225*sW, 700.5*sH, 62.6*sW, 9.2*sH, tocolor(255, 255, 0, 100))
        dxDrawRectangle(23.5*sW, 700.5*sH, 130.5*sW/maxHealth*playerHealth, 9.2*sH, HP_Colour)        
        dxDrawRectangle(156.6*sW, 700.5*sH, 65*sW/100*playerArmor, 9.2*sH, tocolor(0, 102, 255, 190))
        dxDrawRectangle(225*sW, 700.5*sH, 62.6*sW/1000*playerOxygen, 9.2*sH, tocolor(255, 255, 0, 190))                          
        dxDrawImage((10+5)*xFactor, sy-((200+5))*yFactor, (300-10)*xFactor, (175)*yFactor, rt, 0, 0, 0, tocolor(255, 255, 255, 220))
        local health = math.max(math.min(getElementHealth(localPlayer)/(0.232018558500192*getPedStat(localPlayer, 24) -32.018558511152), 1), 0)
        local armor = math.max(math.min(getPedArmor(localPlayer)/100, 1), 0)
        local oxygen = math.max(math.min(getPedOxygenLevel(localPlayer)/(1.5*getPedStat(localPlayer, 225) +1000), 1), 0)
        local rx, ry, rz = getElementRotation(localPlayer)
        local lB = (15)*xFactor
        local rB = (15+290)*xFactor
        local tB = sy-(205)*yFactor
        local bB = tB + (175)*yFactor
        local cX, cY = (rB+lB)/2, (tB+bB)/2 +(35)*yFactor
        local toLeft, toTop, toRight, toBottom = cX-lB, cY-tB, rB-cX, bB-cY
        blib = getElementsByType("blip")
        for  v=1, #blib do
            local value = blib[v] 
            local bx, by = getElementPosition(value)
            local actualDist = getDistanceBetweenPoints2D(x, y, bx, by)
            local maxDist = getBlipVisibleDistance(value)
            if actualDist <= maxDist and getElementDimension(value)==getElementDimension(localPlayer) and getElementInterior(value)==getElementInterior(localPlayer) then
                local dist = actualDist/(6000/((worldW+worldH)/2))
                local rot = findRotation(bx, by, x, y)-camZ
                local bpx, bpy = getPointFromDistanceRotation(cX, cY, math.min(dist, math.sqrt(toTop^2 + toRight^2)), rot)
                local bpx = math.max(lB, math.min(rB, bpx))
                local bpy = math.max(tB, math.min(bB, bpy))
                local bid = getElementData(value, "customIcon") or getBlipIcon(value)
                local _, _, _, bcA = getBlipColor(value)
                local bcR, bcG, bcB = 255, 255, 255
                if getBlipIcon(value) == 0 then
                    bcR, bcG, bcB = getBlipColor(value)
                end
                local bS = getBlipSize(value)
                dxDrawImage(bpx -(blip*bS)*xFactor/1, bpy -(blip*bS)*yFactor/1, (blip*bS)*xFactor, (blip*bS)*yFactor, "image/blip/"..bid..".png", 0, 0, 0, tocolor(bcR, bcG, bcB, bcA))
            end
        end
        if renderNorthBlip then
            local rot = -camZ+180
            local bpx, bpy = getPointFromDistanceRotation(cX, cY, math.sqrt(toTop^2 + toRight^2), rot) --get position
            local bpx = math.max(lB, math.min(rB, bpx))
            local bpy = math.max(tB, math.min(bB, bpy)) --cap position to screen
            local dist = getDistanceBetweenPoints2D(cX, cY, bpx, bpy) --get distance to the capped position
            local bpx, bpy = getPointFromDistanceRotation(cX, cY, dist, rot) --re-calculate position based on new distance
            if bpx and bpy then --if position was obtained successfully
                local bpx = math.max(lB, math.min(rB, bpx))
                local bpy = math.max(tB, math.min(bB, bpy)) --cap position just in case

            end
        end
        dxDrawImage(cX -(blip*2)*xFactor/2, cY -(blip*2)*yFactor/2, (blip*2)*xFactor, (blip*2)*yFactor, "image/player.png", camZ-rz, 0, 0)
    end
end
addEventHandler("onClientRender", root, drawRadar)

107 - line error

Spoiler

 

Link to comment
4 часа назад RavenLoad сказал:

Разместите meta.xml 

Spoiler

<file src="image/player.png" type="client" cache="false"></file>
    <file src="image/blip/01.png" type="client" cache="false"></file>
    <file src="image/blip/02.png" type="client" cache="false"></file>
    <file src="image/blip/05.png" type="client" cache="false"></file>
    <file src="image/blip/06.png" type="client" cache="false"></file>
    <file src="image/blip/07.png" type="client" cache="false"></file>
    <file src="image/blip/08.png" type="client" cache="false"></file>
    <file src="image/blip/09.png" type="client" cache="false"></file>
    <file src="image/blip/10.png" type="client" cache="false"></file>
    <file src="image/blip/11.png" type="client" cache="false"></file>
    <file src="image/blip/12.png" type="client" cache="false"></file>
    <file src="image/blip/13.png" type="client" cache="false"></file>
    <file src="image/blip/14.png" type="client" cache="false"></file>
    <file src="image/blip/15.png" type="client" cache="false"></file>
    <file src="image/blip/16.png" type="client" cache="false"></file>
    <file src="image/blip/17.png" type="client" cache="false"></file>
    <file src="image/blip/18.png" type="client" cache="false"></file>
    <file src="image/blip/19.png" type="client" cache="false"></file>
    <file src="image/blip/20.png" type="client" cache="false"></file>
    <file src="image/blip/21.png" type="client" cache="false"></file>
    <file src="image/blip/22.png" type="client" cache="false"></file>
    <file src="image/blip/23.png" type="client" cache="false"></file>
    <file src="image/blip/24.png" type="client" cache="false"></file>
    <file src="image/blip/25.png" type="client" cache="false"></file>
    <file src="image/blip/26.png" type="client" cache="false"></file>
    <file src="image/blip/27.png" type="client" cache="false"></file>
    <file src="image/blip/28.png" type="client" cache="false"></file>
    <file src="image/blip/29.png" type="client" cache="false"></file>
    <file src="image/blip/30.png" type="client" cache="false"></file>
    <file src="image/blip/31.png" type="client" cache="false"></file>
    <file src="image/blip/32.png" type="client" cache="false"></file>
    <file src="image/blip/33.png" type="client" cache="false"></file>
    <file src="image/blip/34.png" type="client" cache="false"></file>
    <file src="image/blip/35.png" type="client" cache="false"></file>
    <file src="image/blip/36.png" type="client" cache="false"></file>
    <file src="image/blip/37.png" type="client" cache="false"></file>
    <file src="image/blip/38.png" type="client" cache="false"></file>
    <file src="image/blip/39.png" type="client" cache="false"></file>
    <file src="image/blip/40.png" type="client" cache="false"></file>
    <file src="image/blip/41.png" type="client" cache="false"></file>
    <file src="image/blip/42.png" type="client" cache="false"></file>
    <file src="image/blip/43.png" type="client" cache="false"></file>
    <file src="image/blip/44.png" type="client" cache="false"></file>
    <file src="image/blip/45.png" type="client" cache="false"></file>
    <file src="image/blip/46.png" type="client" cache="false"></file>
    <file src="image/blip/47.png" type="client" cache="false"></file>
    <file src="image/blip/48.png" type="client" cache="false"></file>
    <file src="image/blip/49.png" type="client" cache="false"></file>
    <file src="image/blip/50.png" type="client" cache="false"></file>
    <file src="image/blip/51.png" type="client" cache="false"></file>
    <file src="image/blip/52.png" type="client" cache="false"></file>
    <file src="image/blip/53.png" type="client" cache="false"></file>
    <file src="image/blip/54.png" type="client" cache="false"></file>
    <file src="image/blip/55.png" type="client" cache="false"></file>
    <file src="image/blip/56.png" type="client" cache="false"></file>
    <file src="image/blip/57.png" type="client" cache="false"></file>
    <file src="image/blip/58.png" type="client" cache="false"></file>
    <file src="image/blip/59.png" type="client" cache="false"></file>
    <file src="image/blip/60.png" type="client" cache="false"></file>
    <file src="image/blip/61.png" type="client" cache="false"></file>
    <file src="image/blip/62.png" type="client" cache="false"></file>
    <file src="image/blip/63.png" type="client" cache="false"></file>

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...