local sampev = require("lib.samp.events")
function sampev.onShowDialog(dialogId, style, title, button1, button2, text) -- Функция проверяет на открытие диалога (любого)
if text:find("Какой текст искать в диалоге") then
sampAddChatMessage("Нужный текст", -1)
end
end