From d3ed042bdda37bb93721e9cdc0b95d18c15d5aa8 Mon Sep 17 00:00:00 2001 From: Michachatz <121869403+Michatec@users.noreply.github.com> Date: Sun, 2 Nov 2025 00:37:42 +0100 Subject: [PATCH] Update tv.lua --- client/tv.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/client/tv.lua b/client/tv.lua index e32a6d6..b676fd4 100644 --- a/client/tv.lua +++ b/client/tv.lua @@ -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) +