HiroShi

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

2 Neutral

1 Follower

About HiroShi

  • Rank
    Newbie
  • Birthday 24/02/1985

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. deve ser o seu radar, pois você deve atribuir funções para aparecer o blip. Caso você esteja usando um radar da INTERNET, recomendo usar outro .-.
  2. tente assim agora: local wx, hy = guiGetScreenSize() local gpsX = 250 local gpsY = 196 local mapSizeX = 214 local mapSizeY = 121 local mapX = -7.00 local mapY = hy-gpsY- -1 local playerX = mapX+127 local playerY = mapY+83.5 local playerSizeX = 26 local playerSizeY = 27 local playerSizeX2 = 16 local playerSizeY2 = 16 addEventHandler("onClientResourceStart", getResourceRootElement(),function() xsize = mapSizeX+30 rr = dxCreateRenderTarget(xsize,xsize,true) rr2 = dxCreateRenderTarget(xsize,xsize,true) centerleft = xsize / 2 centertop = mapSizeY / 2 blipsize = 16 end) playerTexture = dxCreateTexture ("images/GPS/player.png","argb",false,"clamp") playerTexture2 = dxCreateTexture ("images/GPS/player.png","argb",false,"clamp") mapTexture = dxCreateTexture ("images/GPS/radar.jpg","argb",false,"clamp") gpsTexture = dxCreateTexture ("images/GPS/gps.png","argb",false,"clamp") function drawPlayersInTeam(x,y) setPlayerHudComponentVisible("radar", false) --if not getElementData(getLocalPlayer(),"logedin") then return end if getElementData(getLocalPlayer(),"GPS") < 1 then return end for i, player in ipairs(getElementsByType("player")) do if getElementData(player,"gang") == getElementData(getLocalPlayer(),"gang") and getElementData(localPlayer,"gang") ~= 5000 and player ~= localPlayer and getElementData(player,"GPS") > 0 then local playerx,playery = getElementPosition (player) local _,_,rotplayer = getElementRotation(player) if getDistanceBetweenPoints2D ( x,y,playerx,playery) < 5000 then local markx, marky if x > 0 and y > 0 then markx, marky = centerleft+(math.abs(playerx/2)-math.abs(x/2)), centerleft-(math.abs(playery/2)-math.abs(y/2)) elseif x < 0 and y < 0 then markx, marky = centerleft-(math.abs(playerx/2)-math.abs(x/2)), centerleft+(math.abs(playery/2)-math.abs(y/2)) elseif x < 0 and y > 0 then markx, marky = centerleft-(math.abs(playerx/2)-math.abs(x/2)), centerleft-(math.abs(playery/2)-math.abs(y/2)) elseif x > 0 and y < 0 then markx, marky = centerleft+(math.abs(playerx/2)-math.abs(x/2)), centerleft+(math.abs(playery/2)-math.abs(y/2)) end dxDrawImage(markx-(playerSizeX2/2), marky-(playerSizeY2/2),playerSizeX2,playerSizeY2,playerTexture2,-rotplayer,0,0,tocolor(0, 0, 255)) --dxDrawImage(markx-(playerSizeX2/2), marky-(playerSizeY2/2),playerSizeX2,playerSizeY2,playerTexture2,-rotplayer,0,0,tocolor(0, 0, 255)) --dxDrawImage(markx-(playerSizeX2/2), marky-(playerSizeY2/2),playerSizeX2,playerSizeY2,playerTexture2,-rotplayer,0,0,tocolor(0, 0, 255)) end end end end function createGPS() --if not getElementData(getLocalPlayer(),"logedin") then return end if getElementData(getLocalPlayer(),"GPS") < 1 then return end local x,y = getElementPosition(getLocalPlayer()) local _, _,camrot = getElementRotation(getCamera()) dxSetRenderTarget(rr) dxDrawImageSection(0,0,xsize,xsize,1500+x/2-centerleft,1500-y/2-centerleft,xsize,xsize,mapTexture,0,0,0) drawPlayersInTeam(x,y) dxSetRenderTarget() dxSetRenderTarget(rr2) dxDrawImage(0,0,xsize,xsize,rr,camrot) dxSetRenderTarget() dxDrawImageSection(mapX+20,mapY+22,mapSizeX,mapSizeY,(xsize-mapSizeX)/2,(xsize-mapSizeY)/2,mapSizeX,mapSizeY,rr2,0,0,0) dxDrawImage(playerX-playerSizeX/2,playerY-playerSizeY/2,playerSizeX,playerSizeY,playerTexture,0,0,0,tocolor(255, 0, 0, 255)) dxDrawImage(playerX-playerSizeX/2,playerY-playerSizeY/2,playerSizeX,playerSizeY,playerTexture,0,0,0,tocolor(255, 0, 0, 255)) --dxDrawImage(playerX-playerSizeX/2,playerY-playerSizeY/2,playerSizeX,playerSizeY,playerTexture,0,0,0,tocolor(255, 0, 0, 255)) dxDrawImage(mapX+7,mapY,gpsX,gpsY,gpsTexture) end addEventHandler("onClientRender", getRootElement(), createGPS)
  3. cabeça doeu kk, mais acabei entendendo tudo
  4. você deve registrar os carros na tabela: customCarNames
  5. Você terá que fazer uma função igual a function getPlayerFromPartialName(name) no caso você fará um loop que verifica todos os players e separa o que tem o id a qual foi chamado ex: function getPlayerFromId(id) for i,v in ipairs("players") do if getElementData(v, "ID") == tonumber(id) then -- nesse caso usei o elementData famoso do DNL que é do sistema de id dele que é "ID" return v -- esse "V" veio através do loop antes da if o "V" era todos os jogogadores, mais apartir da IF ele se transformou no destinário ! end end end espero ter ajudado ❤️ edit: lembrando para você chamar ele dentro da function que for usar você usa getPlayerFromId(Id do jogador)