text:match

Jendosik

Участник
Автор темы
211
12
Версия MoonLoader
.027.0-preview
Помогите найти текст в диалоге и выводит в sampAddChatMessage с помощю текст матч ид диалого 999
Lua:
function samp.onShowDialog(dialogId, style, title, button1, button2, text)
   if dialogId == 999 then

end
    end
 

Thrill_Pill

Известный
315
109
Нада найти Престиж:
Lua:
function samp.onShowDialog(dialogId, style, title, button1, button2, text)
    if dialogId == 999 then
        if text:find('Престиж:.-(%d+)') then
        number = text:match('Престиж:.-(%d+)') then
        -- делаешь чё тебе надо
        end
    end
end