Jump to content

[HELP] RADAR GTA V


Orelha

Recommended Posts

Olá gostaria de saber como resolver esse problema, quando mexe a câmera o blip mexe junto alguém sabe resolver help me!
74897ed2039a4212931e4f0e81cb2cfa.png
 

#Codigo do blips.


        --#Blips
        local rx, ry, rz = getElementRotation(localPlayer)
        local lB = (18+5)*sW
        local rB = (295-10)*sW
        local tB = screenH-(155+5)*sH
        local bB = tB + (135)*sH
        local cX, cY = (rB+lB)/2, (tB+bB)/2 +(35)*sH
        for k, v in ipairs(getElementsByType("blip")) do            
        local px, py, pz = getElementPosition(localPlayer)    
        local _,_,camZ = getElementRotation(getCamera())            
        local bx, by, bz = getElementPosition(v)
        local actualDist = getDistanceBetweenPoints2D(px, py, bx, by)
        local maxDist = getBlipVisibleDistance(v)
        if ( actualDist <= maxDist ) then
        local dist = actualDist/(6000/((worldW+worldH)/2))
        local rot = findRotation(bx, by, px, py)-camZ
        local bpx, bpy = getPointFromDistanceRotation(cX, cY, dist, rot)
        local bpx = math.max(lB, math.min(rB, bpx))
        local bpy = math.max(tB, math.min(bB, bpy))
        local blipID = getElementData(v, "customIcon") or getBlipIcon(v)
        local _, _, _, bcA = getBlipColor(v)
        local bcR, bcG, bcB = 255, 255, 255
        if getBlipIcon(v) == 0 then
        bcR, bcG, bcB = getBlipColor(v)
        end                                
        local bS = getBlipSize(v)
        dxDrawImage(bpx -(blip*bS)*sW/2, bpy -(blip*bS)*sH/2, (blip*bS)*sW, (blip*bS)*sH, "img/blips/"..blipID..".png", 0, 0, 0, tocolor(bcR, bcG, bcB, bcA))
        end
    end
end        
addEventHandler( "onClientRender", root, drawRadar)

Edited by Orelha
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...