Jump to content

FuriouZ

Members
  • Posts

    459
  • Joined

  • Last visited

Everything posted by FuriouZ

  1. Do you used shaders or .txd files ?
  2. https://nightly.multitheftauto.com/files/shaders/ ... _names.zip
  3. Then You should fix interiors system aswell..
  4. I'm afraid that it doesn't work with mapped objects, but I'll try
  5. Hello! Is there way to set mapped objects draw distance same as original world have ? Without converting .map to .lua.
  6. Error: attempt to call global 'isPilotingCompatibleVehicle' (a nil value)
  7. Damn, I just love the way how speerometer & steering wheel works
  8. FuriouZ

    Image GUI

    Easiest way, use this: https://community.multitheftauto.com/index.php?p= ... ils&id=141
  9. Yeah, its not that hard, i wrote that code just now. This should draw a simulation rectangle and a blip going arround with your ped rotation. EDIT: My bad, i did some miscalculations and errors while writing down the code fully working example now. (Also fixed the function wich makes the magic, so please check. local x,y = guiGetScreenSize() local sx,sy = x*0.1,y*0.8 local cx,cy = x*0.15,y*0.85 local enx,eny = x*0.2,y*0.9 local bpwidth = x*0.01 local bpheight = y*0.01 function onMyRender() local a,b,rot = getElementRotation(getLocalPlayer()) local dx,dy = GetPositionOnRec(rot,sx,sy,cx,cy,enx,eny) dxDrawRectangle(sx,sy,enx-sx,eny-sy,tocolor(150,150,150,100)) -- Radar simulation dxDrawRectangle(dx-(bpwidth/2),dy-(bpheight/2),bpwidth,bpheight,tocolor(255,0,0,255),true) -- random blip end addEventHandler("onClientRender",root, onMyRender) function GetPositionOnRec(rot,sx,sy,cx,cy,enx,eny) local start = {sx, sy} -- Start corner of map drawn local endp = {enx,eny} -- end corner of map drawn local center = {cx, cy} -- Center of map if rot < 360 and rot > 315 then local progress = (rot - 315) / 45 sy,sx = start[2],interpolateBetween(start[1],0,0,center[1],0,0,progress,"Linear") elseif rot > 0 and rot < 45 then local progress = (rot) / 45 sy,sx = start[2],interpolateBetween(center[1],0,0,endp[1],0,0,progress,"Linear") elseif rot > 45 and rot < 90 then local progress = (rot-45) / 45 sx,sy = endp[1],interpolateBetween(start[2],0,0,center[2],0,0,progress,"Linear") elseif rot > 90 and rot < 135 then local progress = (rot-90) / 45 sx,sy = endp[1],interpolateBetween(center[2],0,0,endp[2],0,0,progress,"Linear") elseif rot > 135 and rot < 180 then local progress = (rot-135) / 45 sy,sx = endp[2],interpolateBetween(endp[1],0,0,center[1],0,0,progress,"Linear") elseif rot > 180 and rot < 225 then local progress = (rot-180) / 45 sy,sx = endp[2],interpolateBetween(center[1],0,0,start[1],0,0,progress,"Linear") elseif rot > 225 and rot < 270 then local progress = (rot-225) / 45 sx,sy = start[1],interpolateBetween(endp[2],0,0,center[2],0,0,progress,"Linear") elseif rot > 270 and rot < 315 then local progress = (rot-270) / 45 sx,sy = start[1],interpolateBetween(center[2],0,0,start[2],0,0,progress,"Linear") end local Dx,Dy = sx,sy return Dx,Dy end Thank you ALOT ! One big step done I really appreciate your help but now, how to do the real blips ? I mean, not like the North blip, like the blips should be I hope you understand
  10. This is quite complicated, can you give a an example, how i should draw blips ? Thanks!
  11. Please talk in english I used google translate and answer is : Everything is still the same, blips aren't working
  12. This is so wrong Look https://www.youtube.com/watch?v=cQ13WW1 ... e=youtu.be Sorry for the lag, too lazy to make a new video
  13. Thanks, but now they are all in the same pos whole map size is 3072x3072, but i have there local blip_x = (3000/6000)*MimgW local blip_y = (3000-py)/6000*MimgH It can be too one problem maybe ?
  14. Hello! To be honest, I am this kind person who doesn't reallylike ask help. I'm trying to do as much as I can myself, but still.. Yes, I know there's already a thread about this, but I don't understand this. I even tryed to ask help from this thread author WASSIm, but he didn't respond.. Anyways, probably a lot of people knows my GTA V Style radar ( here ) ,it has over 2000 downloads and people, who uses it, told me a lot of times that this radar need's blips support, Yes i know too that whidout blips there's actually no point of this resource.. So finally I decided to ask help here. I hope that we can fix this problem together. I found some lines from the internet, but there's a problem with the position Screenshot: Here's the full code: local screenW,screenH = guiGetScreenSize() local g_ScreenSize = {guiGetScreenSize()} local resW,resH = 1280,720 local sW,sH = (screenW/resW), (screenH/resH) --local g_ScreenSize = {(screenW/resW), (screenH/resH)} local icons = {} for k = 1,65 do icons[k] = dxCreateTexture("blips/"..k..".png") end local blips = {} local turn = true local alpha = 255 addEventHandler( "onClientResourceStart", resourceRoot, function() --setPlayerHudComponentVisible ( "radar", false ) --# Create Textures hudMaskFX = dxCreateShader("mask.fx") radarTexture = dxCreateTexture("img/radar_map.jpg") maskTexture = dxCreateTexture("img/radar_mask.png") checkTextures = ( hudMaskFX and radarTexture and maskTexture ) if not ( checkTextures ) then outputChatBox( "[GTA V Radar]: Could not create textures. Please use debugscript 3" ) else dxSetShaderValue( hudMaskFX, "sPicTexture", radarTexture ) dxSetShaderValue( hudMaskFX, "sMaskTexture", maskTexture ) end end ) function drawRadar() if not ( checkTextures ) then return end dxSetShaderValue( hudMaskFX, "sMaskTexture", maskTexture ) local x,y = getElementPosition( localPlayer ) local zoom = 13 x = ( x ) / 6000 y = ( y ) / -6000 dxSetShaderValue( hudMaskFX, "gUVPosition", x,y ) dxSetShaderValue( hudMaskFX, "gUVScale", 1/zoom, 1/zoom ) --# Get rotations local _, _, c_Rot = getElementRotation( getCamera()); local _, _, p_Rot = getElementRotation( localPlayer ) dxSetShaderValue( hudMaskFX, "gUVRotAngle", math.rad( -c_Rot )) 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 --# Alpha dxDrawRectangle(23.5*sW, 676.5*sH, 130.5*sW, 9.2*sH, HP_Alpha) dxDrawRectangle(156.6*sW, 676.5*sH, 65*sW, 9.2*sH, tocolor(0, 102, 255, 100)) dxDrawRectangle(225*sW, 676.5*sH, 62.6*sW, 9.2*sH, tocolor(255, 255, 0, 100)) --# Bars dxDrawRectangle(23.5*sW, 676.5*sH, 130.5*sW/maxHealth*playerHealth, 9.2*sH, HP_Colour) dxDrawRectangle(156.6*sW, 676.5*sH, 65*sW/100*playerArmor, 9.2*sH, tocolor(0, 102, 255, 190)) dxDrawRectangle(225*sW, 676.5*sH, 62.6*sW/1000*playerOxygen, 9.2*sH, tocolor(255, 255, 0, 190)) --# Minimap dxDrawImage(18*sW, 530*sH, 275*sW, 160*sH, "img/radar_cover.png", 0, 0, 0, tocolor(255, 255, 255, 255)) dxDrawImage(23*sW, 536*sH, 265*sW, 135*sH, hudMaskFX, 0,0,0, tocolor(255,255,255, 200)) dxDrawImage(144*sW, 595*sH, 20*sW, 20*sH, "img/radar_player.png", -p_Rot+c_Rot, 0, 0, tocolor(255, 255, 255, 255)) --# Blips --local MimgW,MimgH = dxGetMaterialSize(hudMaskFX) local MimgW,MimgH = 265*sW, 135*sH setTimer(function () blips = {} for i, v in ipairs( getElementsByType('blip') ) do local icon = getBlipIcon(v) if icon > 3 then local px,py = getElementPosition(v) local blip_x = (3000+px)/6000*MimgW local blip_y = (3000-py)/6000*MimgH local rot = getPedCameraRotation( localPlayer ) table.insert(blips,{x = blip_x, y = blip_y,icon = icon}) end end end,1000,0) local rot = getPedCameraRotation( localPlayer ) for i, v in ipairs( blips ) do dxDrawImage(v.x-20/2, v.y-20/2, 20 , 20 ,icons[v.icon],rot) end --# Wanted local g_wl = getPlayerWantedLevel( localPlayer ) if ( g_wl > 0 ) then if ( turn == true ) then alpha = alpha + 5 if ( alpha > 180 ) then alpha = 180 turn = false end elseif ( turn == false ) then alpha = alpha - 5 if ( alpha < 0 ) then alpha = 0 turn = true end end dxDrawRectangle(23*sW, 536*sH, 265*sW, 135*sH, tocolor(0, 102, 255, alpha)) else return end end addEventHandler( "onClientRender", root, drawRadar) function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end return t end addEventHandler( "onClientResourceStop", resourceRoot, function() setPlayerHudComponentVisible ( "radar", true ) end) Blips part: --# Blips --local MimgW,MimgH = dxGetMaterialSize(hudMaskFX) local MimgW,MimgH = 265*sW, 135*sH setTimer(function () blips = {} for i, v in ipairs( getElementsByType('blip') ) do local icon = getBlipIcon(v) if icon > 3 then local px,py = getElementPosition(v) local blip_x = (3000+px)/6000*MimgW local blip_y = (3000-py)/6000*MimgH local rot = getPedCameraRotation( localPlayer ) table.insert(blips,{x = blip_x, y = blip_y,icon = icon}) end end end,1000,0) local rot = getPedCameraRotation( localPlayer ) for i, v in ipairs( blips ) do dxDrawImage(v.x-20/2, v.y-20/2, 20 , 20 ,icons[v.icon],rot) end I really hope, that we can bring first fully working, UNCOMPLIED radar FOR FREE to EVERY PLAYER
  15. Will you do only lensfares too? Widhout any shadows etc ? I would like to see it
  16. Hello! I uploaded my resource twice, please delete this version : https://community.multitheftauto.com/index.php?p= ... s&id=10224 Thanks! DONE
  17. You can't remove objects which don't have any collision by E.. Anyways I found a solution week ago
  18. No, It's in default world, if you know what I mean. I started a new map, removed the building and only windows/lights are still there...
  19. Hello again. I have problem with some objects which are hard/impossible to remove. So, the first object is this : Location: Why I need to remove ? (To show, that I am not asking those objects just for fun) Another one: And the reason: I really hope that someone can help me and finally fix this problem
  20. I tryed it, damn awesome !
  21. FuriouZ

    Question

    Still the same problem
  22. FuriouZ

    Question

    But there's still a little problem, if i change the skin and then doesn't reconnect, then if i respawn then i have still the last skin not this what i changed, any solution for this ?
×
×
  • Create New...