mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
fix(esx_textui): Correctly Fix TextUI
fixes 'id' issue, also fixes the "TextUI Is not displaying!" issues :)
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
Debug = ESX.GetConfig().EnableDebug
|
||||
|
||||
local IsShowing = false
|
||||
---@param message any
|
||||
---@param type string
|
||||
---@param Type string
|
||||
local function TextUI(message, type)
|
||||
IsShowing = true
|
||||
SendNUIMessage({
|
||||
action = 'show',
|
||||
message = message and message or 'ESX-TextUI',
|
||||
type = type ~= 0 and type or 'info'
|
||||
type = type == 0 and "info" or type
|
||||
})
|
||||
end
|
||||
|
||||
local function HideUI()
|
||||
if not IsShowing then
|
||||
return
|
||||
end
|
||||
IsShowing = false
|
||||
SendNUIMessage({
|
||||
action = 'hide'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user