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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user