local sampev = require "lib.samp.events"
function sampev.onShowDialog(id, style, title, b1, b2, text)
if id == 1 then -- Где "1" – ID этого диалога. Чтобы узнать: print(id)
text = text:gsub("{......}", "") -- Чтобы с цветом не мучаться.
local lineN = -1
for line in text:gmatch("[^\r\n]+") do
if line:find("Нужное тебе слово") then
lua_thread.create(function() wait(10)
lineN = lineN + 1
sampSendDialogResponse(id, 1, lineN, nil)
end)
end
end
end
end