Jacobob14 Posted March 11, 2014 Share Posted March 11, 2014 (edited) someone help me as I can make them visible blips and radar area on my radar [lua] local function getCameraRotation () px, py, pz, lx, ly, lz = getCameraMatrix() local rotz = 6.2831853071796 - math.atan2 ( ( lx - px ), ( ly - py ) ) % 6.2831853071796 local rotx = math.atan2 ( lz - pz, getDistanceBetweenPoints2D ( lx, ly, px, py ) ) --Convert to degrees rotx = math.deg(rotx) rotz = math.deg(rotz) return rotz end local screenx, screeny = guiGetScreenSize( ); local posX = 30; local posY = 157; -- Make sure it's the right values local width = 135; local height = 135; -- local scale = 0.67; local texture = dxCreateTexture( 'sattelite.png', 'dxt5', true, 'clamp' ); imageWidth, imageHeight = dxGetMaterialSize( texture ); showPlayerHudComponent( "radar", false ) addEventHandler("onClientRender",root, function( ) local px ,py, pz = getElementPosition( localPlayer ) local mapX = px / ( 6000 / imageWidth ) + ( imageWidth / 2 ) - ( width / scale / 2 ); local mapY = py / ( -6000 / imageHeight ) + ( imageHeight / 2 ) - ( height / scale / 2 ); local cx,cy,cz,tx,ty,tz = getCameraMatrix( ); local rotation = getCameraRotation(); local mx, my, mz = getElementPosition(localPlayer); local zone = getZoneName (mx, my, mz, true ) local vl = getElementVelocity ( localPlayer ) local playerTeam = getPlayerTeam ( localPlayer ) local team = getTeamName ( playerTeam ) dxDrawImageSection( posX, screeny - posY, width, height, mapX, mapY, width / scale, height / scale, texture, rotation, 0, 0, tocolor( 255, 255, 255, 230 ), false ); dxDrawText ( "Posición: " .. math.floor(mx) .. " , " .. math.floor(my) .."\nZona: " ..zone.."\nAltura: " .. math.floor(mz) .." metros\nEquipo: "..team, 30, 439, 166, 570,tocolor(255, 255, 255, 255), 0.87, "sans", "left", "top", false, false, true, false, false, rotation ); Edited March 11, 2014 by Guest Link to comment
Bonsai Posted March 11, 2014 Share Posted March 11, 2014 Ask the creator of that code. Link to comment
Saml1er Posted March 12, 2014 Share Posted March 12, 2014 Replace this in Line 22 showPlayerHudComponent( "radar", true ) Link to comment
Moderators Citizen Posted March 12, 2014 Moderators Share Posted March 12, 2014 Replace this in Line 22 showPlayerHudComponent( "radar", true ) No ... It's a custom radar, so it's obvious the original has to be hidden. By the way, this guy just want us to write the code to add blips and radar areas on this custom radar he stolen/copied from somewhere. But it's not gonna happen since it requires too much time and he isn't alone on this forum. Also I aready helped someone to do the exact same thing: viewtopic.php?f=91&t=71784 Link to comment
RenanPG Posted March 12, 2014 Share Posted March 12, 2014 Replace this in Line 22viewtopic.php?f=91&t=71784 Some codes were removed. Link to comment
Karuzo Posted March 12, 2014 Share Posted March 12, 2014 Replace this in Line 22viewtopic.php?f=91&t=71784 Some codes were removed. And now ? The posts from Citizen are still there. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now