Вытащить число из диалога

forget.

Активный
Автор темы
132
79
Как можно вытащить количество материалов?
hks1UmU.png

Lua:
        if sampIsDialogActive() then
            dialogid = sampGetCurrentDialogId()
            if dialogid == 0 then
                text = sampGetDialogText(0)
                print(text)
                text1 = string.match(text, 'Материалы: (%d+)')
                print(text1) -- nil
            end
        end
 

Azller Lollison

я узбек
Друг
1,342
2,266
Как можно вытащить количество материалов?
hks1UmU.png

Lua:
        if sampIsDialogActive() then
            dialogid = sampGetCurrentDialogId()
            if dialogid == 0 then
                text = sampGetDialogText(0)
                print(text)
                text1 = string.match(text, 'Материалы: (%d+)')
                print(text1) -- nil
            end
        end
там не пробел вроде, а \t
 
  • Нравится
Реакции: forget.