local key = require('vkeys')
local imgui = require('imgui')
local encoding = require('encoding')
encoding.default = 'CP1251'
u8 = encoding.UTF8
local window = imgui.ImBool(false)
local xz = imgui.ImInt(0)
local def = {}
function imgui.OnDrawFrame()
if window.v then
imgui.Begin('My window', window)
imgui.Combo(u8'ComboBox', xz, def, #def)
imgui.End()
end
end
function main()
sampRegisterChatCommand('cmd',function(arg) table.insert(def,u8(arg)) end)
while true do wait(0)
imgui.Process = window.v
if wasKeyPressed(key.VK_X) then window.v = not window.v end
end
end