Проверка цвета

Compich

Известный
Автор темы
236
43
Версия MoonLoader
.027.0-preview
Как сделать так, чтобы в этом коде проверялся также цвет строки? (подсвеченная строка)
Lua:
script_name("Fast-Time")

require "lib.moonloader"
local sampev = require 'lib.samp.events'
local requests = require 'requests'

function main()

    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    check = lua_thread.create_suspended(check)
    tit = ""

end

function sampev.onServerMessage(color, text)
    if text:match("Добро пожаловать на Diamond Role Play!") then
        check:run()
    end
end

function sampev.onShowMessage(dialogId, style, title, button1, button2, text)
    tit = title
end

function check()
    wait(200)
    while true do wait(0)
        if not sampIsDialogActive() then   
            sampSendChat('/timeon')
            thisScript():unload()
        end
    end
end
 

winten

Потрачен
409
182
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Lua:
if text == "Добро пожаловать на Diamond Role Play!" and color == 1182971050 then -- зачем искать в строке это сообщение, если на даймонде оно статичное?