[FREE] Rubi Textui (Rainbow Hologram) [ESX, QB-CORE]

Rubi Textui - ESX/QBCore

:rocket: Features

  • :hammer_and_wrench: Compatible with ESX & QBCore: Works out of the box with both frameworks.
  • :art: Customizable Appearance: Change colors, sizes, and animations to fit your server’s theme.
  • :rainbow: Rainbow Animation: Rainbow animation for an attractive UI experience.
  • :bulb: Cybernetic UI Style: Modern hologram-inspired design with dynamic lighting effects.
  • :zap: Lightweight: Minimal performance impact with optimized code.
  • :link: Seamless Integration: Simple installation and easy-to-implement exports.

:rocket: Requirements

  • es_extended / qb-core

Installation for ESX

:open_file_folder: Open @es_extended/client/functions.lua.
:mag_right: Search for function ESX.TextUI .

:arrows_counterclockwise: Replace this function:

function ESX.TextUI(message, notifyType)
    if GetResourceState("esx_textui") ~= "missing" then
        return exports["esx_textui"]:TextUI(message, notifyType)
    end

    print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
end

function ESX.HideUI()
    if GetResourceState("esx_textui") ~= "missing" then
        return exports["esx_textui"]:HideUI()
    end

    print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
end

:arrows_counterclockwise: For this

function ESX.TextUI(message, notifyType)
    if GetResourceState("rubi_textui") ~= "missing" then
        return exports["rubi_textui"]:TextUI(message, notifyType)
    end

    print("[^1ERROR^7] ^5rubi_textui^7 is Missing!")
end

function ESX.HideUI()
    if GetResourceState("rubi_textui") ~= "missing" then
        return exports["rubi_textui"]:HideUI()
    end

    print("[^1ERROR^7] ^5rubi_textui^7 is Missing!")
end

Installation for QBCORE

:open_file_folder: Open @qb-core/client/functions.lua.
:mag_right: Search for function QBCore.Functions.DrawText .

:arrows_counterclockwise: Replace this function:

function QBCore.Functions.DrawText(x, y, width, height, scale, r, g, b, a, text)
    SetTextFont(4)
    SetTextScale(0.0, scale)
    SetTextColour(r, g, b, a)
    SetTextDropshadow(0, 0, 0, 0, 255)
    SetTextEdge(1, 0, 0, 0, 255)
    SetTextEntry("STRING")
    AddTextComponentString(text)
    DrawText(x - width / 2, y - height / 2)
end

:arrows_counterclockwise: For this

function QBCore.Functions.DrawText(x, y, width, height, scale, r, g, b, a, text)
    exports['rubi_textui']:TextUI(text, 'primary') -- Customize 'primary' as needed
end

:open_file_folder: Open @qb-core/client/drawtext.lua.
:arrows_counterclockwise: Replace this function:

local function hideText()
    SendNUIMessage({
        action = 'HIDE_TEXT',
    })
end

local function drawText(text, position)
    if type(position) ~= 'string' then position = 'left' end

    SendNUIMessage({
        action = 'DRAW_TEXT',
        data = {
            text = text,
            position = position
        }
    })
end

local function changeText(text, position)
    if type(position) ~= 'string' then position = 'left' end

    SendNUIMessage({
        action = 'CHANGE_TEXT',
        data = {
            text = text,
            position = position
        }
    })
end

:arrows_counterclockwise: For this

local function hideText()
    exports['rubi_textui']:HideUI()
end

local function drawText(text, position)
    if type(position) ~= 'string' then position = 'left' end

    exports['rubi_textui']:TextUI(text, position)
end

local function changeText(text, position)
    if type(position) ~= 'string' then position = 'left' end

    exports['rubi_textui']:TextUI(text, position)
end

Recommended

  • Add the resource to your server.cfg file:
ensure rubi_textui

Download Github

Code is accessible Yes
Subscription-based No
Lines (approximately) 176
Requirements es_extended / qb-core
Support Yes
1 Like