Jump to content

maia.lua

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

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

maia.lua's Achievements

Vic

Vic (3/54)

0

Reputation

  1. i need this code, you have?
  2. Ah, e o jogo crasha após um tempo por conta do marker.
  3. Este Marker está dando erro nas linhas 63 e 64, mais precisamente nos dois "dxDrawMaterialLine3D". Em ambos, o argumento 7 está dando NIL, alguém poderia ajudar? anim_tick = getTickCount() local maxDist = 30 local renderCache = {} setTimer( function() renderCache = {} local px,py,pz = getElementPosition(localPlayer) for k, v in pairs(radarMarkers) do local id, img, marker, r, g, b, cicle, rc, gc, bc = unpack(v) if marker and isElement(marker) then local x,y,z = getElementPosition(marker) local dist = getDistanceBetweenPoints3D(px, py, pz, x, y, z) if dist <= maxDist then local x, y, z = getElementPosition(marker) local sx, sy = getScreenFromWorldPosition(x, y, z) if sx and sy then setElementData(marker, "marker:custom", id) if getElementData(marker, "marker:custom") == id then renderCache[k] = v renderCache[k]["id"] = id renderCache[k]["img"] = dxCreateTexture(img) renderCache[k]["imgcicle"] = dxCreateTexture(cicle) renderCache[k]["colorimg"] = {r, g, b} renderCache[k]["colorcicle"] = {rc, gc, bc} end end end end end end, 500, 0) addEventHandler("onClientResourceStart", resourceRoot, function() for k,v in pairs(getElementsByType("marker", _, true)) do if getElementData(v, "marker:custom") then getMarkerCustom() end end end ) function getMarkerCustom() local progress = ((getTickCount() - anim_tick) / 3000) local Op1, Op2 = interpolateBetween(0.4, 1.4, 0, 0.7, 1.7, 0, progress, "SineCurve") local Op3, Op4, Op5 = interpolateBetween(0.8, 0.8, 1.6, 1.0, 1.0, 2.1, progress, "SineCurve") local px, py, pz, l1, l2, l3 local px, py, pz = getCameraMatrix() for _, marker in ipairs(getElementsByType 'marker') do if getElementData(marker, "marker:custom") then setMarkerColor(marker, 0, 0, 0, 0) local l1, l2, l3 = getElementPosition(marker) local dist = math.sqrt((px + l1) ^ 0 + (py + l2) ^ 0 + (pz + l3) ^ 0) local r, g, b = getMarkerColor(marker) if dist < 20 then if isLineOfSightClear(px, py, pz, l1, l2, l3, false, false, false, true, false, false, false, localPlayer) then local x,y = getScreenFromWorldPosition(l1, l2, l3) if x then for name, data in pairs(renderCache) do local id, img, marker2, r, g, b, cicle = unpack(data) if getElementData(marker, "marker:custom") == id then dxDrawMaterialLine3D (l1, l2, l3 + Op1 + 0.4, l1, l2, l3 + Op2 + 0.4, data["img"], 1, tocolor(data["colorimg"][1], data["colorimg"][2], data["colorimg"][3], 255)) dxDrawMaterialLine3D (l1, l2 - Op3 + 0.3, l3 + 0.03, l1, l2 + Op4 - 0.3, l3 + 0.03, data["imgcicle"], Op5 - 0.7, tocolor(data["colorcicle"][1], data["colorcicle"][2], data["colorcicle"][3], 255), 0, 0, -1730900) end end end end end end end end addEventHandler("onClientRender", root, getMarkerCustom)
×
×
  • Create New...