local sampev = require 'lib.samp.events'
local text_dialog = {}
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
if text:find('') then
text_dialog = {}
for line in text:gmatch("[^\n]+") do
table.insert(text_dialog, line)
end
end
end
-- imgui
for k, v in ipairs(text_dialog) do
imgui.Text(v)
end