Jump to content

Kahinan Silva

Members
  • Posts

    3
  • Joined

  • Last visited

Details

  • Gang
    SOS
  • Location
    Las Venturas
  • Occupation
    Assaltar
  • Interests
    Sei la

Recent Profile Visitors

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

Kahinan Silva'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. Sim eu utilizo ele, mas mesmo assim em outras resoluções ficam ruins. Responsive.lua, e no client é onde está a hud em si screen = {guiGetScreenSize ()} resolution = {1366,768} sx, sy = screen[1] / resolution[1], screen[2] / resolution[2] function setScreenPosition (x, y, w, h) return ((x / resolution[1]) * screen[1]), ((y / resolution[2]) * screen[2]), ((w / resolution[1]) * screen[1]), ((h / resolution[2]) * screen[2]) end function isCursorOnElement (x, y, w, h) if isCursorShowing () then local cursor = {getCursorPosition ()} local mx, my = cursor[1] * screen[1], cursor[2] * screen[2] return mx > x and mx < x + w and my > y and my < y + h end return false end function dxDrawTextOnElement(TheElement, text, height, distance, R, G, B, alpha, size, font, ...) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getCameraMatrix() local distance = distance or 20 local height = height or 1 if (isLineOfSightClear(x, y, z+2, x2, y2, z2, ...)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end _dxCreateFont = dxCreateFont function dxCreateFont (path, scale, ...) local _, scale, _, _ = setScreenPosition (0, scale, 0, 0) return _dxCreateFont (path, scale, ...) end _dxDrawRectangle = dxDrawRectangle function dxDrawRectangle (x, y, w, h, ...) local x, y, w, h = setScreenPosition (x, y, w, h) return _dxDrawRectangle (x, y, w, h, ...) end _dxDrawImage = dxDrawImage function dxDrawImage (x, y, w, h, ...) local x, y, w, h = setScreenPosition (x, y, w, h) return _dxDrawImage (x, y, w, h, ...) end _dxDrawImageSection = dxDrawImageSection function dxDrawImageSection (x, y, w, h, ...) local x, y, w, h = setScreenPosition (x, y, w, h) return _dxDrawImageSection (x, y, w, h, ...) end _svgCreate = svgCreate function svgCreate(w,h,...) local _,_,w,h = setScreenPosition(0,0,w,h) return _svgCreate(w,h,...) end _dxDrawText = dxDrawText function dxDrawText (text, x, y, w, h, ...) local x, y, w, h = setScreenPosition (x, y, w, h) return _dxDrawText (text, x, y, (x + w), (y + h), ...) end _isCursorOnElement = isCursorOnElement function isCursorOnElement (x, y, w, h) local x, y, w, h = setScreenPosition (x, y, w, h) return _isCursorOnElement (x, y, w, h) end local svgList = {} function drawRoundRect(id, x, y, width, height, color, border_radius) border_radius = border_radius or 0 color = color or tocolor(255,255,255) if (not svgList[id]) then local rawData = string.format([[ <svg width="%s" height="%s" xmlns="http://www.w3.org/2000/svg"> <rect rx="%s" ry="%s" width="%s" height="%s" style="fill:#FFFFFF"/> </svg> ]], width, height, border_radius, border_radius, width, height) svgList[id] = svgCreate(width, height, rawData) end if (svgList[id]) then dxSetBlendMode('add') dxDrawImage(x, y, width, height, svgList[id], 0, 0, 0, color, false) dxSetBlendMode('blend') end end
  2. Olá possuo um sistema de hud em svg, soque o problema é que quando mudo de resolução tudo muda muito, deformando a hud, queria saber como proporcionar a melhor qualidade da hud em todas resoluções possiveis. Como fica em minha resolução: https://imgur.com/72FWtgC Como fica em outras menores: https://imgur.com/Ap6JtA2
  3. local lockCfg = { ['state'] = false, ['insert'] = false, ['acertou'] = false, ['tickCount'] = {}, ['posições'] = { [1] = {563, 612}, [2] = {642, 691}, [3] = {700, 749}, [4] = {772, 821} } } addEvent("render.lockpick", true) addEventHandler("render.lockpick", root, function() if (not lockCfg['state']) then addEventHandler("onClientRender", root, onLockPickRender) setElementFrozen(localPlayer, true) lockCfg['tickCount'] = getTickCount() lockCfg['acertou'] = false lockCfg['insert'] = false lockCfg['state'] = true else removeEventHandler("onClientRender", root, onLockPickRender) setElementFrozen(localPlayer, false) lockCfg['state'] = false end end ) addEventHandler("onClientKey", root, function(button, press) if (lockCfg['state']) then if (button == "e" and press) then if (alphaVerify >= lockCfg['posições'][index][1] and alphaVerify <= lockCfg['posições'][index][2]) then exports['infinity_infobox']:showInfobox("Você acertou", "success") triggerEvent("render.lockpick", localPlayer) lockCfg['acertou'] = true else exports['infinity_infobox']:showInfobox("Você errou", "error") triggerEvent("render.lockpick", localPlayer) end end end end ) Olá, eu estou com um sistema de lockpick em construção, soq ao Acertar o ponto da lockpick ele apenas some, mas eu quero que ao acertar a posição indicada da lockpick ele ira renderizar mais 1 ou 2 vezes o "onLockPickRender", como eu poderia fzr isso ?
×
×
  • Create New...