Freezysek Posted March 14, 2023 Share Posted March 14, 2023 1) VerzePůjdeme do esx_textui/TextUI.lua najdeme si : exports['esx_textui']:showTextUI(message) Následně esx_textui nahradíme ox_lib : exports['ox_lib']:showTextUI(message) Taktéž by to mělo vypadat i u hideTextUI : exports['ox_lib']:hideTextUI() 2) Verze Půjdeme do esx_textui/TextUI.lua najdeme si : SendNUIMessage({ action = 'show', message = message and message or 'ESX-TextUI', type = type(typ) == "string" and typ or 'info' }) Následně toto celé vymažeme a nahradíme : exports['ox_lib']:showTextUI(message) Taktéž by to mělo vypadat i u hideTextUI : exports['ox_lib']:hideTextUI() 1 Quote Link to comment Share on other sites More sharing options...
Mxthess Posted June 2, 2023 Share Posted June 2, 2023 Debug = ESX.GetConfig().EnableDebug local isShowing = false ---@param message string ---@param typ string local function TextUI(message, typ) isShowing = true exports['ox_lib']:showTextUI(message) end local function HideUI() if not isShowing then return end isShowing = false exports['ox_lib']:hideTextUI() end exports['ox_lib']:showTextUI(message) exports['ox_lib']:hideTextUI() RegisterNetEvent('esx:showTextUI', TextUI) RegisterNetEvent('esx:hideTextUI', HideUI) if Debug then RegisterCommand("textui:error", function() ESX.TextUI("i ~r~love~s~ donuts", "error") end) RegisterCommand("textui:success", function() ESX.TextUI("i ~g~love~s~ donuts", "success") end) RegisterCommand("textui:info", function() ESX.TextUI("i ~b~love~s~ donuts", "info") end) RegisterCommand("textui:hide", function() ESX.HideUI() end) end Mám to takhle ale nejde to bejku Quote Link to comment Share on other sites More sharing options...
Logerys Posted January 8 Share Posted January 8 (edited) Debug = ESX.GetConfig().EnableDebug local isShowing = false ---@param message string ---@param typ string local function TextUI(message, typ) isShowing = true exports['ox_lib']:showTextUI(message) end local function HideUI() if not isShowing then return end isShowing = false exports['ox_lib']:hideTextUI() end exports('TextUI', TextUI) exports('HideUI', HideUI) RegisterNetEvent('ESX:TextUI', TextUI) RegisterNetEvent('ESX:HideUI', HideUI) if Debug then RegisterCommand("textui:error", function() ESX.TextUI("i ~r~love~s~ donuts", "error") end) RegisterCommand("textui:success", function() ESX.TextUI("i ~g~love~s~ donuts", "success") end) RegisterCommand("textui:info", function() ESX.TextUI("i ~b~love~s~ donuts", "info") end) RegisterCommand("textui:hide", function() ESX.HideUI() end) end Quote Takhle to nádherně funguje Edited January 8 by Logerys Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.