Ну распознавание диалога как-то так выглядит, а выбор строки и ввод текста через sampSendDialogResponse
local ev = require 'lib.samp.events'
function ev.onShowDialog(id, style, title, button1, button2, text)
if id == 228 then -- Или по id диалога
sampSendDialogResponse(id, button...