помогите с системой черного списка

askfmaskfaosflas

Потрачен
Автор темы
1,089
509
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Версия MoonLoader
.026-beta
не работает

Lua:
function sampev.onChatMessage(playerId, text)
    if text:match('say (.+)') then
        sampAddChatMessage('say найден!!!!!!!!!!!!')
        if ini.muted[nick] == nil then
            sampAddChatMessage('say найден!!!!!!!!!!!!')
            for nick, time in pairs(ini.muted) do
                if text:find(nick) then
                    sampAddChatMessage('say найден!!!!!!!!!!!!')
                    local log = io.open("moonloader/sayBlackList.log", "a+")
                    log:write(os.date('[%H:%M:%S] ')..text..'\n')
                    return false
                else
                    lua_thread.create(function()
                        wait(1207)
                        local msg = text:match('say (.+)')
                        if text:match('setpos') then return sampSendChat("Невозможно использовать setpos!") end
                        if text:match('hp') then return sampSendChat("Невозможно изменить здоровье!") end
                        sampSendChat(msg)
                    end)
                end
            end
        end
    end
end
 

askfmaskfaosflas

Потрачен
Автор темы
1,089
509
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.