mirror of
https://github.com/Michatec/ptelevision.git
synced 2026-03-31 23:46:30 +02:00
Update tv.lua
This commit is contained in:
@@ -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)
|
||||
end, false)
|
||||
|
||||
Reference in New Issue
Block a user