verebes122

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

1 Neutral

About verebes122

  • Rank
    Square

Recent Profile Visitors

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

  1. Köszi már közben valahogy megoldottam, bár picit másképp néz ki. Le is akartam zárni a topicot csak nem tudtam hogy kell
  2. EDIT: Mostmár ha telibe ránézek jó helyen van de ha elfordulok akkor fordul a kamerával: for k,v in pairs(getElementsByType('blip')) do local blipPosX,blipPosY = getElementPosition(v) local rotationBetween = findRotation(playerX,playerY,blipPosX,blipPosY) local distanceBetween_GAME = getDistanceBetweenPoints2D (playerX,playerY,blipPosX,blipPosY) local distanceBetween_PIXELS = distanceBetween_GAME * (3000/6000) local x,y = w/2, h/2 local blipScreenX,blipScreenY = getPointFromDistanceRotation(x+w/2,y+h/2,distanceBetween_PIXELS,rotationBetween) dxDrawText ( blipScreenX .. ' , '.. blipScreenY , bw/2,bh/2,bw/2,bh/2 ,tocolor(255,255,255,255)) blipScreenX = math.max(x, math.min(x+w, blipScreenX)) blipScreenY = math.max(y, math.min(y+h, blipScreenY)) dxDrawImage(blipScreenX- 10, blipScreenY - 10, 20, 20, 'player.png'); end
  3. Sziasztok! Angol nyelvű topicban már megnyitottam ezt a témát de nem sikerült megoldani. Esetleg valaki tud segíteni ? A problémám, hogy egyáltalán nem jelenik meg blip bárhogy számolgatok pozíciókat. Itt a kód, a blip koord számítást, most kitöröltem belőle. local c = exports.gw_core local screenX,screenY = guiGetScreenSize() local fonts = c:getFonts() local options = c:getOptions() local w,h = c:getSize(300), c:getSize(250) local bx,by = c:getSize(50), screenY - c:getSize(50)-h local x,y = c:getSize(60), screenY - c:getSize(40) - h local arrowSize = c:getSize(30) local bw,bh = w*2,h*2 local map = dxCreateTexture('world.jpg') local blipTarget = dxCreateRenderTarget(bw,bh) local zoom = 5 setPlayerHudComponentVisible ( 'radar',false) function getMapCord(element) local x,y = getElementPosition(element) local imgSize = 3072 return ((x + 3000) / 6000) * imgSize, (-(y - 3000) / 6000) * imgSize end local blip = createBlip (2075.62890625,-1715.8212890625,13.546875, 0) addEventHandler('onClientRender',root,function() local _,_,r = getElementRotation(getCamera()) local _,_,pr = getElementRotation(localPlayer) local posX,posY = getMapCord(localPlayer) local playerX,playerY = getElementPosition(localPlayer) dxSetRenderTarget(blipTarget) dxDrawImageSection ( 0,0, bw,bh,posX - bw/2, posY - bh/2, bw ,bh ,map,r) for k,v in pairs(getElementsByType('blip')) do -- ITT KÉNE VALAHOGY KISZÁMITANI end dxSetRenderTarget() dxDrawRectangle ( bx,by,w+c:getSize(20),h+c:getSize(20), options.panelDark) dxDrawImageSection ( x,y,w,h,w/2,h/2,w,h,blipTarget) dxDrawImage ( x + w/2 - arrowSize/2, y + h/2 - arrowSize/2, arrowSize,arrowSize,'player.png',r-pr,0,0) end) 33.sor amit nézni kell, ott nem tudom ,hogy milyen számítást kéne végezzek.
  4. There's no blip on the minimap.
  5. (Oops, sorry for the non-english comment.) So, today I tried out the code your wrote, but something is wrong with that. I know it's hard to write a code, without testing.
  6. Igen, magyar vagyok ( Nem tudom mennyire megengedett fórumon magyarul írni )
  7. for k,v in pairs(getElementsByType('blip')) do local blipPosX,blipPosY = getElementPosition(v) local blipX,blipY = getMapCord(v) local rotationBetween = findRotation(playerX,playerY,blipPosX,blipPosY) local distanceBetween = getDistanceBetweenPoints2D (playerX,playerY,blipPosX,blipPosY) local blipScreenX,blipScreenY = getPointFromDistanceRotation(playerX,playerY,distanceBetween,rotationBetween) local MAP_RECTANGLE_START_X, MAP_RECTANGLE_START_Y = x,y local MAP_RECTANGLE_END_X, MAP_RECTANGLE_END_Y = x + s, y + s blipScreenX = math.max(MAP_RECTANGLE_START_X, math.min(MAP_RECTANGLE_END_X, blipScreenX)) blipScreenY = math.max(MAP_RECTANGLE_START_Y, math.min(MAP_RECTANGLE_END_Y, blipScreenY)) dxDrawImage(blipScreenX- 10, blipScreenY - 10, 20, 20, 'player.png'); -- I don't have blip images yet end I think I didn't understood something, because it's not showing blip in my minimap. What's wrong with this code?
  8. I know i can rotate the image, but i don't want it. I just want to place it to the right place when i rotate the map. If i rotate the blip it will rotate upside down, and I don't want that.
  9. Hello guys! I have an issue with my radar script and I can't fix it. I wanted to draw the server's blips to the player's minimap, but i don't know how to calculate the X,Y coordinates on the radar when I rotate my camera. That's my client side script: local c = exports.gw_core local screenX,screenY = guiGetScreenSize() local fonts = c:getFonts() local options = c:getOptions() local s = c:getSize(300) local bx,by = c:getSize(50), screenY - c:getSize(50)-s local x,y = c:getSize(60), screenY - c:getSize(40) - s local arrowSize = c:getSize(30) local bs = s*2 local mapTarget = dxCreateRenderTarget(bs,bs) local map = dxCreateTexture('world.jpg') local blipTarget = dxCreateRenderTarget(3000,3000) setPlayerHudComponentVisible ( 'radar',false) function getMapCord(element) local x,y = getElementPosition(element) local imgSize = 3072 return ((x + 3000) / 6000) * imgSize, (-(y - 3000) / 6000) * imgSize end local blip = createBlip (1962.291015625,-1751.20703125,13.3828125, 0) addEventHandler('onClientRender',root,function() local _,_,r = getElementRotation(getCamera()) local _,_,pr = getElementRotation(localPlayer) local posX,posY = getMapCord(localPlayer) dxSetRenderTarget(blipTarget) dxDrawImageSection ( posX - bs/2, posY - bs/2, bs,bs,posX - bs/2, posY - bs/2, bs,bs,map,r) for k,v in pairs(getElementsByType('blip')) do local blipX,blipY = getMapCord(v) dxDrawImage(blipX - 10, blipY - 10, 20, 20, 'player.png'); -- I don't have blip images yet end dxSetRenderTarget() dxDrawRectangle ( bx,by,s+c:getSize(20),s+c:getSize(20), options.panelDark) dxDrawImageSection ( x,y,s,s,posX - s/2, posY - s/2, s,s,blipTarget) dxDrawImage ( x + s/2 - arrowSize/2, y + s/2 - arrowSize/2, arrowSize,arrowSize,'player.png',r-pr,0,0) end) There's the problem in the game :
  10. How can i use shaders?
  11. Hi guys! How can i create skins for a weapon? For example a default M4 and a Gold M4.