- 黄金
- 367.90 黄金

[FREE] Rubi Textui (Rainbow Hologram) [ESX, QB-CORE]
Rubi Textui - ESX/QBCore 🚀 Features 🛠 Compatible with ESX & QBCore: Works out of the box with both frameworks. 🎨 Customizable Appearance: Change colors, sizes, and animations to fit your server’s theme. 🌈 Rainbow Animation: Rainbow animation for an attractive UI experience. 💡 Cybernetic UI...

Ruby 文本 - ESX/QBCore
特征

要求

- es_extended / qb-core
ESX 安装



Lua:
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

Lua:
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
QBCORE 的安装



Lua:
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

Lua:
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


代码:
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

Lua:
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
安装
- 将资源添加到您的server.cfg文件中:
代码:
ensure rubi_notify
下载 Github