радужный рендер

Решение
так?

Lua:
local font = renderCreateFont("Arial",15,5)
function rainbow(speed, alpha)
    local r = math.floor(math.sin(os.clock() * speed) * 127 + 128)
    local g = math.floor(math.sin(os.clock() * speed + 2) * 127 + 128)
    local b = math.floor(math.sin(os.clock() * speed + 4) * 127 + 128)
    return r,g,b,alpha
end
function main()
    while not isSampAvailable() do wait(100) end

    while true do wait(0)
        local r,g,b,a = rainbow(0.6, 255)
        renderFontDrawText(font, 'zom', 200, 250, string.format('0xFF%d%d%d',r,g,b))
    end
end

qdIbp

Автор темы
Проверенный
1,447
1,196
так?

Lua:
local font = renderCreateFont("Arial",15,5)
function rainbow(speed, alpha)
    local r = math.floor(math.sin(os.clock() * speed) * 127 + 128)
    local g = math.floor(math.sin(os.clock() * speed + 2) * 127 + 128)
    local b = math.floor(math.sin(os.clock() * speed + 4) * 127 + 128)
    return r,g,b,alpha
end
function main()
    while not isSampAvailable() do wait(100) end

    while true do wait(0)
        local r,g,b,a = rainbow(0.6, 255)
        renderFontDrawText(font, 'zom', 200, 250, string.format('0xFF%d%d%d',r,g,b))
    end
end
 
  • Нравится
Реакции: AugustTN