Jump to content

Muurlio_

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

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

Muurlio_'s Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Quando clico no item não seleciona. Este é meu código atual... local screenW, screenH = guiGetScreenSize() local show_inv = false local show_confirm = false local selectedC = tocolor(0, 255, 255, 255) local colorC = tocolor(0, 0, 0, 0) local selected = nil function dxInv() local dados = getElementData(localPlayer, 'inv.item') or {} local peso = pesoI(localPlayer) slots = {} local x = 0.4047 local tx = 0.4344 local ty = 0.3971 local y = 0.3919 for i,v in ipairs(dados) do dxDrawImage(screenW * x, screenH * y, screenW * 0.0484, screenH * 0.0755, item[(v.id)].img, 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("("..(v.qnt)..")", screenW * tx, screenH * ty, screenW * 0.4516, screenH * 0.4141, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawRectangle(screenW * x, screenH * y, screenW * 0.0484, screenH * 0.0755, i == selected and selectedC or colorC, false) slots[i] = {screenW * x, screenH * y, screenW * 0.0484, screenH * 0.0755} x = x + 0.0530 tx = tx + 0.0515 if x > 0.6009 then y = y + 0.0808 x = 0.4047 tx = 0.4273 ty = ty + 0.0808 end end end function clickInv(b, s) if show_Inv == true then if s=='down' then if b=='left' then for i,v in ipairs(slots) do if isMouseInPosition(v[1], v[2], v[3], v[4]) then selected = i end end end end end end function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end
  2. Does anyone know why the text is appearing this way and not where I request it? (next to the image) this is my current code followed by the print of the problem. function dxInv() local dados = getElementData(localPlayer, 'inv.item') or {} local x = 0.4047 local tx = 0.4273 local ty = 0.3945 local y = 0.3919 for i,v in ipairs(dados) do dxDrawImage(screenW * x, screenH * y, screenW * 0.0484, screenH * 0.0755, item[(v.id)].img, 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("("..(v.qnt)..")", screenW * tx, screenH * ty, screenW * 0.4516, screenH * 0.4141, tocolor(255, 255, 255, 255), 1.00, "default", "right", "top", false, false, true, false, false) x = x + 0.0515 tx = tx + 0.0515 if x > 0.6009 then y = y + 0.0808 x = 0.4047 tx = 0.4273 ty = ty + 0.0808 end end end
×
×
  • Create New...