Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pn-textui

The new TextUI system works by using export (Show / Hide)

Examples

Show

exports['pn-textui']:Show(key, displayText)

Hide

exports['pn-textui']:Hide()

How to implement it in QBCore & ESX

QBCore

Go to qb-core/client/drawtext.lua and replace

RegisterNetEvent('qb-core:client:DrawText', function(text, position)
    drawText(text, position)
end)

RegisterNetEvent('qb-core:client:HideText', function()
    hideText()
end)

to

RegisterNetEvent('qb-core:client:DrawText', function(key, text)
    exports['pn-textui']:Show(key, text)
end)

RegisterNetEvent('qb-core:client:HideText', function()
   exports['pn-textui']:Hide()
end)

ESX

Go to es_extended/client/functions.lua and replace

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

to

function ESX.TextUI(key, text)
    if GetResourceState("pn-textui") ~= "missing" then
        return exports['pn-textui']:Show(key, text)
    end

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

function ESX.HideUI()
    if GetResourceState("pn-textui") ~= "missing" then
        return exports['pn-textui']:Hide()
    end

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

Preview

Video

About

A TextUI script [STANDALONE]

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages