Jacobob14 Posted April 8, 2015 Share Posted April 8, 2015 i try to make the radarareas in GTAV radar but does not work appear in different positions any help please? local mx,my = 3000,3000 local renderareas = dxCreateRenderTarget( 600, 600,true ) local renderradar = dxCreateRenderTarget( 342, 264,true ) local altura = 1500 function doDrawAreas() local vehicle = getPedOccupiedVehicle (localPlayer) if isPedInVehicle(localPlayer) then local vx,vy,vz = getElementVelocity(vehicle) velocidade = ( 1 + (vx^2 + vy^2 + vz^2)^(0.5) ) / 3.5 end local altd = altura * math.min(velocidade,2) - 80 dxSetRenderTarget( renderareas,true ) if getElementInterior(localPlayer) == 0 then for i, v in ipairs( getElementsByType('radararea') ) do local tick=abs(getTickCount()%1000-500) local aFactor=tick/500 local r,g,b,a = getRadarAreaColor(v) local w,h = getRadarAreaSize(v) local ax,ay = getElementPosition(v) local x,y = (3000+(ax))/6000*mx, (3000-(ay))/6000*my if isRadarAreaFlashing(v) then a=a*aFactor end dxDrawRectangle(x, (y-h) + 4 + (h/2), (w/2), (h/2), tocolor(r,g,b,a)) end end dxSetRenderTarget() local rot = getPedCameraRotation(localPlayer) local px,py = getElementPosition(localPlayer) local tx,ty = (3000+px)/6000*mx, (3000-py)/6000*my dxDrawImageSection(0,0, 600, 600, tx-(altd/2),ty-(altd/2),altd,altd, renderareas,-rot,0,0,tocolor(255,255,255,255)) end Link to comment
#RooTs Posted April 8, 2015 Share Posted April 8, 2015 try this Meta.xml function="createRoundRadarArea" type="client"/> function="roundRadarAreaDimensions" type="client"/> function="roundRadarAreaFlashing" type="client"/> function="roundRadarAreaColor" type="client"/> function="isElementInRoundRadarArea" type="client"/> function="getElementsInRoundRadarArea" type="client"/> function="createRoundRadarArea" type="server"/> function="roundRadarAreaDimensions" type="server"/> function="roundRadarAreaFlashing" type="server"/> function="roundRadarAreaColor" type="server"/> function="isElementInRoundRadarArea" type="server"/> function="getElementsInRoundRadarArea" type="server"/> Link to comment
-.Paradox.- Posted April 9, 2015 Share Posted April 9, 2015 try thisMeta.xml function="createRoundRadarArea" type="client"/> function="roundRadarAreaDimensions" type="client"/> function="roundRadarAreaFlashing" type="client"/> function="roundRadarAreaColor" type="client"/> function="isElementInRoundRadarArea" type="client"/> function="getElementsInRoundRadarArea" type="client"/> function="createRoundRadarArea" type="server"/> function="roundRadarAreaDimensions" type="server"/> function="roundRadarAreaFlashing" type="server"/> function="roundRadarAreaColor" type="server"/> function="isElementInRoundRadarArea" type="server"/> function="getElementsInRoundRadarArea" type="server"/> What the f..? Nigg@ are you high or what? Link to comment
#RooTs Posted April 9, 2015 Share Posted April 9, 2015 that's the part of script I use, this should help dxSetRenderTarget() dxSetRenderTarget( areas,true ) if getElementInterior(localPlayer) == 0 then for i, v in ipairs( getElementsByType('radararea') ) do local r,g,b,a = getRadarAreaColor(v) local w,h = getRadarAreaSize(v) local ax,ay = getElementPosition(v) local x,y = (0+ax)/0*mx, (0-ay)/0*my if isRadarAreaFlashing(v) then a = a*math.abs(getTickCount()%1000-500)/500 end dxDrawRectangle(x, (y-h) + 4 + (h/2), (w/2), (h/2), tocolor(r,g,b,a+100)) end end Link to comment
Mr.unpredictable. Posted April 9, 2015 Share Posted April 9, 2015 You're funny roots. Link to comment
#RooTs Posted April 9, 2015 Share Posted April 9, 2015 You're funny roots. have a problem with my help? the part of the code is wrong. he can use mine, I see nothing funny about it Link to comment
Mr.unpredictable. Posted April 9, 2015 Share Posted April 9, 2015 I was talking about this function="createRoundRadarArea" type="client"/> function="roundRadarAreaDimensions" type="client"/> function="roundRadarAreaFlashing" type="client"/> function="roundRadarAreaColor" type="client"/> function="isElementInRoundRadarArea" type="client"/> function="getElementsInRoundRadarArea" type="client"/> function="createRoundRadarArea" type="server"/> function="roundRadarAreaDimensions" type="server"/> function="roundRadarAreaFlashing" type="server"/> function="roundRadarAreaColor" type="server"/> function="isElementInRoundRadarArea" type="server"/> function="getElementsInRoundRadarArea" type="server"/> Link to comment
#RooTs Posted April 9, 2015 Share Posted April 9, 2015 this was the basis of an script old 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