diff --git a/ptelevision/client/tv.lua b/ptelevision/client/tv.lua index df43e99..61b7e37 100644 --- a/ptelevision/client/tv.lua +++ b/ptelevision/client/tv.lua @@ -41,24 +41,29 @@ function BroadcastMenu() end function WebBrowserMenu() + lib.hideMenu() local input = lib.inputDialog('Web Browser', {'URL:'}) - if not input then OpenTVMenu() end - TriggerServerEvent("ptelevision:event", GetClosestScreen().net_id, "ptv_status", { - type = "browser", - url = input[1] - }) - OpenTVMenu() + if input then + TriggerServerEvent("ptelevision:event", GetClosestScreen().net_id, "ptv_status", { + type = "browser", + url = input[1] + }) + end + Citizen.Wait(300) + OpenTVMenu() end function VideoMenu() + lib.hideMenu() local input = lib.inputDialog('Video Player', {'URL:'}) - - if not input then OpenTVMenu() end - TriggerServerEvent("ptelevision:event", GetClosestScreen().net_id, "ptv_status", { - type = "play", - url = input[1] - }) + if input then + TriggerServerEvent("ptelevision:event", GetClosestScreen().net_id, "ptv_status", { + type = "play", + url = input[1] + }) + end + Citizen.Wait(300) OpenTVMenu() end diff --git a/ptelevision/fxmanifest.lua b/ptelevision/fxmanifest.lua index 270c4ef..7f388d6 100644 --- a/ptelevision/fxmanifest.lua +++ b/ptelevision/fxmanifest.lua @@ -13,6 +13,7 @@ files { } shared_scripts { + "@es_extended/imports.lua", "@ox_lib/init.lua", "config.lua", "shared/*.lua" diff --git a/ptelevision/shared/main.lua b/ptelevision/shared/main.lua index a8e075c..7e149cc 100644 --- a/ptelevision/shared/main.lua +++ b/ptelevision/shared/main.lua @@ -1,3 +1,5 @@ +Inventory = exports.ox_inventory + function DumpArray(obj, seen) if type(obj) ~= 'table' then return obj end if seen and seen[obj] then return seen[obj] end