sc_textUI
A simple UI for FiveM that works with all frameworks.
(Tested under ESX-Legacy and QBCore)
» Download sc_textUI
Usage client.lua
Show UI with text and key
exports.sc_textUI:showUI(key, message)
-- example
exports.sc_textUI:showUI("E", "Press to interact")
Hide UI
exports.sc_textUI:hideUI()
Usage server.lua
Show UI with text and key
TriggerClientEvent("sc_textUI:showUI", playerId, key, message)
-- example
TriggerClientEvent("sc_textUI:showUI", playerId, "E", "Press to interact")
Hide UI
TriggerClientEvent("sc_textUI:hideUI", playerId)
Example script (client.lua)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if playerJob == 'police' then
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
for _, marker in ipairs(markers) do
local distance = GetDistanceBetweenCoords(playerCoords, marker.x, marker.y, marker.z, true)
if distance < 5.0 then
DrawMarker(1, marker.x, marker.y, marker.z - 1.0, 0, 0, 0, 0, 0, 0, 1.0, 1.0, 0.5, 36, 144, 218, 0.8, false, true, 2, nil, nil, false)
if distance < 1.0 then
exports.sc_textUI:showUI("E", "Press to interact")
if IsControlJustPressed(0, 38) then
exports.sc_textUI:hideUI()
TriggerServerEvent('sc_lc:checkJobAndOpenMenu')
end
else
exports.sc_textUI:hideUI()
end
end
end
end
end
end)
Installation
Clone or download this repository
Add sc_textUI to your resources directory
Add this in your server.cfg :
ensure sc_textUI
» Check out my other resources
» sc_taxsystem [FREE]
» sc_extinguisher [FREE]
» sc_animatedNPC [FREE]
» sc_dumpster-diving [FREE]
» sc_hud [FREE]
» sc_package [FREE]
» sc_licensemanager [FREE]
Code is accessible | Yes |
Subscription-based | No |
Requirements | No |
Support | Yes |