Хелп с проверкой

Эди42312

Новичок
Автор темы
10
0
Версия MoonLoader
.027.0-preview
Почему не работает?

Lua:
function sampev.onShowDialog(id, style, title, b1, b2, text)
    if id == 1500 and stataon then
        if  text:find('Mafiaa') then
sampAddChatMessage('', -1)
        sampAddChatMessage('[ MafiaHelper ]: {ffffff}Скрипт загружен' , 0x0088FF)
        sampAddChatMessage('[ MafiaHelper ]: {ffffff}/mafhelp - Помощь по скрипту' , 0x0088FF)
        sampAddChatMessage('[ MafiaHelper ]: {ffffff}Cоздатель: Zero Loompey' , 0x0088FF)
sampAddChatMessage('', -1)
        else
        thisScript():unload()
        end
        stataon = false
        return false
    end
end
По идее скрипт должен делать проверку по стате, но скрипт игнорирует эту функцию.
 

Albertio

Attention! Thanks for your attention.
877
702
Lua:
function sampev.onShowDialog(id, style, title, b1, b2, text)
  if id == 1500 and stataon == true then
    if text:find('Mafiaa') then
      sampAddChatMessage('', -1)
      sampAddChatMessage('[ MafiaHelper ]: {ffffff}Скрипт загружен', 0x0088FF)
      sampAddChatMessage('[ MafiaHelper ]: {ffffff}/mafhelp - Помощь по скрипту', 0x0088FF)
      sampAddChatMessage('[ MafiaHelper ]: {ffffff}Cоздатель: Zero Loompey', 0x0088FF)
      sampAddChatMessage('', -1)
    else
      script.this:unload()
    end
    stataon = false
    return false
  end
end
 

Эди42312

Новичок
Автор темы
10
0
Lua:
function sampev.onShowDialog(id, style, title, b1, b2, text)
  if id == 1500 and stataon == true then
    if text:find('Mafiaa') then
      sampAddChatMessage('', -1)
      sampAddChatMessage('[ MafiaHelper ]: {ffffff}Скрипт загружен', 0x0088FF)
      sampAddChatMessage('[ MafiaHelper ]: {ffffff}/mafhelp - Помощь по скрипту', 0x0088FF)
      sampAddChatMessage('[ MafiaHelper ]: {ffffff}Cоздатель: Zero Loompey', 0x0088FF)
      sampAddChatMessage('', -1)
    else
      script.this:unload()
    end
    stataon = false
    return false
  end
end
не робит