Добавление рендера для скрипта
Пример сеттингов в скрипт
function functionName()
return "Custom HUD"
end
function startClient()
setting.addBool(mod, "Рендер таргетЕСП", true)
end
function onEvent(event)
local renderTESP = setting.get(mod, "Рендер таргетЕСП")
if renderTESP then
if event:getName() == "render_event" then
if event:is2D() then
if auraTarget.isActiveTarget() then
ent = auraTarget:getTarget()
x = calculateInterpolatedPosition(ent:lastTickPosX(), ent:getX(), event:getPartialTicks())
y = calculateInterpolatedPosition(ent:lastTickPosY(), ent:getY(), event:getPartialTicks())
z = calculateInterpolatedPosition(ent:lastTickPosZ(), ent:getZ(), event:getPartialTicks())
pos = project.projection(x, y + 1, z)
gl11.pushMatrix()
gl11.position(pos[1], pos[2], 0)
gl11.rotate(math.sin(utils.currentTimeMillis() / 1000) * 360, 0, 0, 1)
gl11.position(-(pos[1]), -(pos[2]), 0)
gl11.color(color.get(0))
display.drawImage("https://i.pinimg.com/originals/02/44/48/024448db5a243cb0b831cbd1ddcb0fa3.jpg", pos[1] - 50, pos[2] - 50, 100, 100)
gl11.popMatrix()
end
end
end
end
end
function calculateInterpolatedPosition(previousPos, currentPos, partialTicks)
return (previousPos + (currentPos - previousPos) * partialTicks);
end
Last updated