From 969ce331e6095ba773608205b80067360b7703ad Mon Sep 17 00:00:00 2001 From: Michachatz <121869403+Michatec@users.noreply.github.com> Date: Sun, 2 Nov 2025 00:32:54 +0100 Subject: [PATCH] Update tv.lua --- client/tv.lua | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/client/tv.lua b/client/tv.lua index b599e26..e32a6d6 100644 --- a/client/tv.lua +++ b/client/tv.lua @@ -1,4 +1,4 @@ -TelevisionsLocal = {} +local TelevisionsLocal = {} function SetChannel(index) TriggerServerEvent("ptelevision:event", CURRENT_SCREEN, "ptv_status", { @@ -20,8 +20,8 @@ function GetChannelList() channel = status.channel end for index,value in pairs(Channels) do - table.insert(channel_list, {index = index, url = value.url}) - table.insert(menu_list, "Channel #" .. index .. " (".. value.name ..")") + channel_list[#channel_list+1] = {index = index, url = value.url} + menu_list[#menu_list+1] = "Channel #" .. index .. " (".. value.name ..")" if channel ~= nil and channel == index then current = #channel_list end @@ -95,10 +95,6 @@ function OpenTVMenu() SetChannel(ChannelList.list[scrollIndex].index) end end, - onSelected = function(selected, scrollIndex, args) - end, - onClose = function(keyPressed) - end, options = { {label = 'Videos', description = 'Play a video or stream on the screen.'}, {label = 'Web Browser', description = 'Access the web via your TV.'}, @@ -219,8 +215,8 @@ end) RegisterCommand('tv', function() OpenTVMenu() -end) +end, false) -RegisterCommand("broadcast", function(source, args, raw) +RegisterCommand('broadcast', function() BroadcastMenu() -end) \ No newline at end of file +end, false)