fix(esx_textui): Correctly Fix TextUI

fixes 'id' issue, also fixes the "TextUI Is not displaying!" issues :)
This commit is contained in:
Mycroft
2022-11-26 17:12:39 +00:00
parent 45e931c103
commit 8cb620dfe1
+8 -3
View File
@@ -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'
})