Update tv.lua

This commit is contained in:
Michachatz
2025-11-02 00:37:42 +01:00
committed by GitHub
parent 081d452f49
commit d3ed042bdd

View File

@@ -59,11 +59,17 @@ end
function VideoMenu()
lib.hideMenu()
local input = lib.inputDialog('Video Player', {'URL:'})
if input then
local input = lib.inputDialog('Video Player', {
{ type = 'input', label = 'Video URL' },
{ type = 'checkbox', label = 'Loop Video' },
{ type = 'checkbox', label = 'Show Video Controls' }
})
if input then
TriggerServerEvent("ptelevision:event", CURRENT_SCREEN, "ptv_status", {
type = "play",
url = input[1]
url = input[1],
loop = input[2],
showControls = input[3]
})
end
Citizen.Wait(300)
@@ -181,7 +187,7 @@ RegisterNetEvent("ptelevision:event", function(data, index, key, value)
if (index) then
local event = value
if (event.type == "play") then
local data = { url = event.url }
local data = { url = event.url, loop = event.loop, showControls = event.showControls }
if (event.channel) then
data = Channels[event.channel]
data.channel = event.channel
@@ -220,3 +226,4 @@ end, false)
RegisterCommand('broadcast', function()
BroadcastMenu()
end, false)