Jump to content

[ HELP ] Radar GTA V Bordered


SpoC^

Recommended Posts

Posted (edited)
All these post and you just only keep saying debugscript? Seriously??!

it's so simple, after creating your main render target just add which i guess it's 'radarRT2' :

dxSetTextureEdge( radarRT2, "border", tocolor( 255, 255, 255, 100 ) ) 

Look complete function
  
function renderRadar() 
    if not radarRT1 and radarRT2 then return end 
    dxDrawImage(70*sW, 697*sH, 236*sW, 9*sH, "sz/blips/radarbg.png", 0, 0, 0, tocolor(0, 0, 0, RBACK_ALPHA)) 
     
---------------------------------------------------------------------------- 
  
    local vehicle = getPedOccupiedVehicle (localPlayer) 
    if isPedInVehicle(localPlayer) then 
    local vx,vy,vz = getElementVelocity(vehicle) 
    velocidade = ( 1 + (vx^2 + vy^2 + vz^2)^(0.5)  ) / 2 
        else 
    local vx,vy,vz = getElementVelocity(localPlayer) 
    velocidade = math.max(1 + (vx^2 + vy^2 + vz^2)^(0.5), 2)/5 
    end 
  
    local alt = MAP_SIZE * math.min(velocidade,2) - 80 
  
        dxDrawImageSection(0, 0, rtSX, rtSY, uvX, uvY, uvSX, uvSY, MAP_PATH) 
         
  
---------------------------------------------------------------------------- 
         
        local aPercent = math.abs(getTickCount()%1000 - 500) / 500 
        for k, Rarea in ipairs( getElementsByType("radararea") ) do 
            if isElementVisible(Rarea) then 
                local r, g, b, a = getRadarAreaColor(Rarea) 
                local x, y, _ = getElementPosition(Rarea) 
                local sx, sy = getRadarAreaSize(Rarea) 
                 
                local rx, ry = getImagePointFromWorld(x, y) 
                local rsx, rsy = sx * MAP_MPP, -sy * MAP_MPP 
                 
                if isRadarAreaFlashing(Rarea) then a = a * aPercent end 
                 
                dxDrawRectangle(rx-uvX, ry-uvY, rsx, rsy, tocolor(r, g, b, a)) 
            end 
        end 
         
        dxSetRenderTarget(radarRT1, true) 
        dxDrawImage(0, 0, rtSX, rtSY, radarRT2, crot) 
  
         
          
dxSetBlendMode("blend") 
dxSetRenderTarget() 
dxDrawImageSection(RADAR_X-10, RADAR_Y-10, RADAR_SX+20, RADAR_SY+20, rtSX/2-RADAR_SX/2, rtSY/2-RADAR_SY/2, RADAR_SX, RADAR_SY, radarRT1, 0, 0, 0, tocolor(255, 255, 255, 11)) 
dxDrawImageBorder (RADAR_X-10, RADAR_Y-10, RADAR_SX+20, RADAR_SY+20, tocolor(0,0,0,255) ,2,false) 
  
  
  
-- My code 
function dxDrawImageBorder (corX, corY, imageWidth, imageHeight, lineColor, lineWidth, postGUI ) 
    local lineWidth = lineWidth or 1 
    dxDrawLine ( corX, corY, corX+imageWidth, corY, lineColor, lineWidth, postGUI ) 
    dxDrawLine ( corX, corY, corX, corY+imageHeight, lineColor, lineWidth, postGUI ) 
    dxDrawLine ( corX, corY+imageHeight, corX+imageWidth, corY+imageHeight, lineColor, lineWidth, postGUI ) 
    return dxDrawLine ( corX+imageWidth, corY, corX+imageWidth, corY+imageHeight, lineColor, lineWidth, postGUI ) 
end 
         
                 
  
  
--hud health Armour 
  
--dxDrawRectangle(sW*67, sH*695, sW*241, sH*13, tocolor(0, 0, 0, 100), false) 
local sz1, sz2, sz3 = getHealthColor() 
local health = math.floor( getElementHealth( getLocalPlayer() )) 
if ( health  <= 50) then 
                HP_Colour = tocolor(sz1, sz2, sz3, textAlpha) 
                HP_Alpha = tocolor(sz1, sz2, sz3, 100) 
            else 
                HP_Colour = tocolor(103, 188, 107, 255) 
                HP_Alpha = tocolor(103, 188, 107, 100)               
            end 
  
local stat = getPedStat ( getLocalPlayer(), 24 ) 
if stat < 1000 then 
dxDrawRectangle(sW*71, sH*698, sW*116, sH*7, HP_Alpha, false) --fundo 
dxDrawRectangle(sW*71, sH*698, sW*116/100*health, sH*7, HP_Colour, false) 
else 
dxDrawRectangle(sW*72, sH*698, sW*115, sH*7, HP_Alpha, false) --fundo 
dxDrawRectangle(sW*72, sH*698, sW*115/200*health, sH*7, HP_Colour, false) 
end 
  
  if fadeIn == false then 
    textAlpha = textAlpha - 7 
  elseif fadeIn == true then 
    textAlpha = textAlpha + 7 
  end 
  checkApha() 
  
  
local armour = getPedArmor ( getLocalPlayer() ) 
dxDrawRectangle(sW*190, sH*698, sW*55, sH*7, tocolor(95, 165, 206, 100), false) 
if armour>0 then 
dxDrawRectangle(sW*190, sH*698, sW*55/100*armour, sH*7, tocolor(95, 165, 206, 255), false) 
end 
  
  
local oxigenio= getPedOxygenLevel ( getLocalPlayer() ) 
dxDrawRectangle(sW*248, sH*698, sW*56, sH*7, tocolor(253, 219, 36, 140), false) 
  
if oxigenio < 1000 or isElementInWater (getLocalPlayer()) then 
dxDrawRectangle(sW*248, sH*698, sW*55, sH*7, tocolor(61, 94, 112, 255), false) 
  
  
  
  
  
  
end 
addEventHandler("onClientRender", root, renderRadar) 
  

What a mess.

this function did not change anything

dxSetTextureEdge( radarRT2, "border", tocolor( 255, 255, 255, 100 ) ) 

Edited by Guest
Posted

@Blaawee next time try to check the code before you start talking .

@ SpoC^ you want a border and as i can see my code is working and you have one now .

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
@Blaawee next time try to check the code before you start talking .

@ SpoC^ you want a border and as i can see my code is working and you have one now .

@Walid

Look my intention for border, Transparency on the map edge on GPS

fz12yt.png

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...