local binds = imgui.ImBuffer(65000)
local delay = imgui.ImInt(1000)
function bind()
lua_thread.create(function()
local delay = tonumber(delay.v)
for str in string.gmatch(binds.v, "[^\r\n]+") do
sampAddChatMessage(u8:decode(str), -1)
wait(delay)
end
end)
end
--OnDrawFrame
imgui.InputTextMultiline('', binds, imgui.ImVec2(400, 400))
imgui.InputInt(u8'Задержка в МС:', delay)
imgui.SameLine()
if imgui.Button(u8'Запустить бинд') then
if #binds.v == 0 then
sampAddChatMessage('Ошибка, введите текст', -1)
else
bind()
end
end