Fixed Forced Focus Error

This commit is contained in:
Pickle
2022-10-30 05:16:45 -04:00
committed by GitHub
parent 00def0b030
commit 6b49ca735a
3 changed files with 20 additions and 12 deletions

View File

@@ -41,24 +41,29 @@ function BroadcastMenu()
end end
function WebBrowserMenu() function WebBrowserMenu()
lib.hideMenu()
local input = lib.inputDialog('Web Browser', {'URL:'}) local input = lib.inputDialog('Web Browser', {'URL:'})
if not input then OpenTVMenu() end if input then
TriggerServerEvent("ptelevision:event", GetClosestScreen().net_id, "ptv_status", { TriggerServerEvent("ptelevision:event", GetClosestScreen().net_id, "ptv_status", {
type = "browser", type = "browser",
url = input[1] url = input[1]
}) })
OpenTVMenu() end
Citizen.Wait(300)
OpenTVMenu()
end end
function VideoMenu() function VideoMenu()
lib.hideMenu()
local input = lib.inputDialog('Video Player', {'URL:'}) local input = lib.inputDialog('Video Player', {'URL:'})
if input then
if not input then OpenTVMenu() end TriggerServerEvent("ptelevision:event", GetClosestScreen().net_id, "ptv_status", {
TriggerServerEvent("ptelevision:event", GetClosestScreen().net_id, "ptv_status", { type = "play",
type = "play", url = input[1]
url = input[1] })
}) end
Citizen.Wait(300)
OpenTVMenu() OpenTVMenu()
end end

View File

@@ -13,6 +13,7 @@ files {
} }
shared_scripts { shared_scripts {
"@es_extended/imports.lua",
"@ox_lib/init.lua", "@ox_lib/init.lua",
"config.lua", "config.lua",
"shared/*.lua" "shared/*.lua"

View File

@@ -1,3 +1,5 @@
Inventory = exports.ox_inventory
function DumpArray(obj, seen) function DumpArray(obj, seen)
if type(obj) ~= 'table' then return obj end if type(obj) ~= 'table' then return obj end
if seen and seen[obj] then return seen[obj] end if seen and seen[obj] then return seen[obj] end