mimgui

- |2347| -

Активный
Автор темы
177
43
Версия SA-MP
  1. 0.3.7 (R1)
  2. 0.3.7-R2
  3. 0.3.7-R3
  4. 0.3.7-R4
  5. 0.3DL
  6. 0.3e (R1) / CR-MP
  7. CR-MP 0.3.7
  8. Любая
  9. Другая
Нужно переделать под mimgui


lua:
function main()
    while not isSampAvailable() do wait(100) end
    if not doesDirectoryExist("moonloader//config") then
        createDirectory("moonloader//config")
        inicfg.save(inputs11, "objwallhack")
      end
     inputs = inicfg.load(nil, "objwallhack")
      if not inputs then
        inicfg.save(inputs11, "objwallhack")
        inputs = inicfg.load(nil, "objwallhack")
      end
      for i, val in ipairs(inputs) do
          if #val == 3 then
            table.insert(tabl,{imgui.ImInt(val[1]), imgui.ImBuffer((tostring(u8:decode(u8(val[2])))), 20), imgui.ImBool(val[3])})
           else
            checkbox123 = imgui.ImBool(val[1])
        end
    end
    local font = renderCreateFont("Arial", 7, 4)
    sampRegisterChatCommand("renderob", function() enab.v = not enab.v end)
      while true do
        wait(0)
        imgui.Process = enab.v
        if checkbox.v or checkbox123.v then
            for _, v in pairs(getAllObjects()) do
                local asd
                if sampGetObjectSampIdByHandle(v) ~= -1 then
                    asd = sampGetObjectSampIdByHandle(v)
                end
                if isObjectOnScreen(v) then
                    local _, x, y, z = getObjectCoordinates(v)
                    local x1, y1 = convert3DCoordsToScreen(x,y,z)
                    local model = getObjectModel(v)
                    local x2,y2,z2 = getCharCoordinates(PLAYER_PED)
                    local x10, y10 = convert3DCoordsToScreen(x2,y2,z2)
                    local distance = string.format("%.1f", getDistanceBetweenCoords3d(x, y, z, x2, y2, z2))
                    if checkbox.v then
                        renderFontDrawText(font, (checkbox222.v and asd and "model = "..model.."; id = "..asd or "model = "..model).."; distance: "..distance, x1, y1, -1)
                        if traser.v then
                            renderDrawLine(x10, y10, x1, y1, 1.0, -1)
                        end
                    elseif checkbox123.v then
                        for _, v2 in ipairs(tabl) do
                            if v2[1].v == model and v2[3].v then
                                renderFontDrawText(font, (v2[2].v:find(".+") and u8:decode(v2[2].v) or checkbox333.v and asd and "model = "..model.."; id = "..asd or "model = "..model).."; distance: "..distance    , x1, y1, -1)
                                if traser.v then
                                    renderDrawLine(x10, y10, x1, y1, 1.0, -1)
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end
 
  • Эм
Реакции: YarikVL

riverya4life

Известный
393
170
 
  • Нравится
  • Влюблен
Реакции: YarikVL и MLycoris