local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local window = imgui.ImBool(false)
local font = renderCreateFont('Tahoma', 13, 5)
local settings = {
-- {'название', переменная, айди модели}
{'Мусор', imgui.ImBool(false), 1},
{'Руда', imgui.ImBool(false), 2},
{'Клад', imgui.ImBool(false), 3},
{'Анаша', imgui.ImBool(false), 4},
{'Подарки', imgui.ImBool(false), 5},
{'Нарко', imgui.ImBool(false), 6},
{'Мусорка', imgui.ImBool(false), 7},
}
function main()
while not isSampAvailable() do wait(200) end
imgui.Process = false
window.v = true --show window
while true do
wait(0)
imgui.Process = window.v
for k, v in ipairs(getAllObjects()) do
for i = 1, #settings do
if settings[i][2].v then
local mx, my, mz = getCharCoordinates(PLAYER_PED)
if getObjectModel(v) == settings[i][3] then
local result, x, y, z = getObjectCoordinates(v)
if result then
local mrx, mry = convert3DCoordsToScreen(mx, my, mz)
local rx, ry = convert3DCoordsToScreen(x, y, z)
renderDrawLine(mrx, mry, rx, ry, 3, 0xFFff004d)
renderFontDrawText(font, settings[i][1], rx, ry, 0xFFFFFFFF)
end
end
end
end
end
end
end
function imgui.OnDrawFrame()
if window.v then
imgui.SetNextWindowPos(imgui.ImVec2(350.0, 250.0), imgui.Cond.FirstUseEver)
imgui.SetNextWindowSize(imgui.ImVec2(100.0, 185.0), imgui.Cond.FirstUseEver)
imgui.Begin('RENDER ON', window, imgui.WindowFlags.NoResize + imgui.WindowFlags.NoCollapse)
for i = 1, #settings do
imgui.Checkbox(u8(settings[i][1]), settings[i][2])
end
imgui.End()
end
end