Merge pull request #742 from Rav3n95/main

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