Page 1 of 1

esx_textui

Posted: Thu Feb 26, 2026 6:34 pm
by greenie
The text ui (hud) system used by es_extended Only available on clientside

TextUI
This function will show a text ui pop up.

Arguments

message: string
The TextUI message.
TextUI types

success
error
info
ESX.TextUI('Press [E] to use', 'error')
Export Example

exports['esx_textui']:TextUI('Press [E] to use', 'error')

HideUI
This function will hide the TextUI.

This will close any TextUI that is currently open.

ESX Example
local interactCoords = vector3(0, 0, 0)
CreateThread(function()
local TextUI
while true do
local coords = GetEntityCoords(PlayerPedId())
local inDist = #(coords - interactCoords) < 2.0
if inDist and not TextUI then
ESX.TextUI('Press [E] to interact')
elseif inDist and TextUI then
ESX.HideUI()
end
Wait(500)
end
end)
Export Example
local interactCoords = vector3(0, 0, 0)
CreateThread(function()
local TextUI
while true do
local coords = GetEntityCoords(PlayerPedId())
local inDist = #(coords - interactCoords) < 2.0
if inDist and not TextUI then
exports['esx_textui']:TextUI('Press [E] to interact')
elseif inDist and TextUI then
exports['esx_textui']:HideUI()
end
Wait(500)
end
end)