Skip to content
esx_textui

esx_textui

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 Example

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.

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)