fix text ui again

This commit is contained in:
P Gergő
2022-12-15 13:44:25 +01:00
committed by GitHub
parent 684752c8ae
commit 13281e6053
+7 -9
View File
@@ -1,21 +1,19 @@
Debug = ESX.GetConfig().EnableDebug
local IsShowing = false
local isShowing = false
---@param message string
---@param Type string
local function TextUI(message, type)
IsShowing = true
---@param typ string
local function TextUI(message, typ)
isShowing = true
SendNUIMessage({
action = 'show',
message = message and message or 'ESX-TextUI',
type = type == 0 and "info" or type
type = type(typ) == "string" and typ or 'info'
})
end
local function HideUI()
if not IsShowing then
return
end
IsShowing = false
if not isShowing then return end
isShowing = false
SendNUIMessage({
action = 'hide'
})