mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-02 11:18:53 +00:00
Update TextUI.lua
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
Debug = false
|
||||
|
||||
---@param message any
|
||||
---@param type string
|
||||
local function TextUI(message, type)
|
||||
SendNUIMessage({
|
||||
action = 'show',
|
||||
@@ -15,4 +19,22 @@ end
|
||||
exports('TextUI', TextUI)
|
||||
exports('HideUI', HideUI)
|
||||
RegisterNetEvent('ESX:TextUI', TextUI)
|
||||
RegisterNetEvent('ESX:HideUI', HideUI)
|
||||
RegisterNetEvent('ESX:HideUI', HideUI)
|
||||
|
||||
if Debug then
|
||||
RegisterCommand("textui:error", function()
|
||||
TriggerEvent("ESX:TextUI", "i ~r~love~s~ donuts", "error")
|
||||
end)
|
||||
|
||||
RegisterCommand("textui:success", function()
|
||||
TriggerEvent("ESX:TextUI", "i ~r~love~s~ donuts", "success")
|
||||
end)
|
||||
|
||||
RegisterCommand("textui:info", function()
|
||||
TriggerEvent("ESX:TextUI", "i ~r~love~s~ donuts", "info")
|
||||
end)
|
||||
|
||||
RegisterCommand("textui:hide", function()
|
||||
TriggerEvent("ESX:HideUI")
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user