- 49
- 3
- Версия MoonLoader
- Другое
код:
local success, imgui = pcall(require, 'mimgui')
if not success then
print('error 101 (mimgui not found!)')
end
local success, vkeys = pcall(require, 'vkeys')
if not success then
print('error 102 (vkeys not found!)')
end
local success, ffi = pcall(require, 'ffi')
if not success then
print('error 103 (ffi not found!)')
end
local encoding = require 'encoding'
encoding.default = 'CP1251'
local wm = require 'windows.message'
local new = imgui.new
local renderWindow = new.bool()
local sizeX, sizeY = getScreenResolution()
imgui.OnInitialize(function()
imgui.GetIO().IniFilename = nil
end)
local newFrame = imgui.OnFrame(
function() return renderWindow[0] end,
function(player)
imgui.SetNextWindowPos(imgui.ImVec2(sizeX / 2, sizeY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(200, 150), imgui.Cond.FirstUseEver)
imgui.Begin("Main Window", renderWindow, imgui.WindowFlags.NoResize)
imgui.Text("GAMESENSE")
imgui.Text(string.format("Gamesense is work?: %s", renderWindow[0]))
imgui.Checkbox('RageBot', ragebot)
if ragebot[0] then
sampAddChatMessage('test')
end
imgui.End()
end
)
function main()
addEventHandler('onWindowMessage', function(msg, wparam, lparam)
if msg == wm.WM_KEYDOWN or msg == wm.WM_SYSKEYDOWN then
if wparam == vkeys.VK_6 then
renderWindow[0] = not renderWindow[0]
end
end
end)
wait(-1)
end