PezFenix2016 Posted April 1, 2017 Share Posted April 1, 2017 Hey there, I have been scripting a cinema for myself, the problem is that it isn't showing the video, The video does not play on the screen, it just stays static, I do not see any errors in my code, what do you guys think I'm doing wrong? Here you go, this is my client-sided code: local ventanitaLinda = guiCreateWindow(281, 281, 484, 149, "YT", false) addEventHandler("onClientResourceStart", resourceRoot, function () guiWindowSetSizable(ventanitaLinda, false) guiSetVisible(ventanitaLinda,false) links = guiCreateEdit(117, 31, 353, 36, "", false,ventanitaLinda) guiWindowSetSizable(ventanitaLinda, false) guiSetAlpha(ventanitaLinda, 1.00) etiqueta= guiCreateLabel(42, 36, 139, 25, "Ingrese ID:", false,ventanitaLinda) btngo = guiCreateButton(10, 90, 191, 44, "Crear", false,ventanitaLinda) btncancel = guiCreateButton(274, 88, 191, 44, "Cancelar", false,ventanitaLinda) etiqueta2 = guiCreateLabel(224, 102, 31, 22, "O", false,ventanitaLinda) guiSetVisible(ventanitaLinda,false) end ) function dxDrawImage3D(x,y,z,w,h,m,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c , ...) end local screenWidth, screenHeight = guiGetScreenSize() local webBrowser = createBrowser(screenWidth, screenHeight, false, false) function webBrowserRender() local x, y = 110.7, 1024.15 dxDrawMaterialLine3D(x, y, 23.25, x, y, 14.75, webBrowser, 18.2, tocolor(255, 255, 255, 255), x, y+1, 19) end function fullscreen() local URLs = tostring(links) if source == btngo then loadBrowserURL(webBrowser, "https://www.youtube.com/embed/"..URLs.."?autoplay=1&iv_load_policy=3&enablejsapi=1&fs=0&theme=light") addEventHandler("onClientRender", root, webBrowserRender) end end addEventHandler("onClientBrowserCreated", webBrowser, fullscreen) addEventHandler("onClientGUIClick",root,fullscreen) function url() guiSetVisible(ventanitaLinda,true) showCursor( true ) guiSetInputEnabled( true ) end addEvent("onAbrir", true) addEventHandler("onAbrir", root, url) function closeman() if source == btncancel then guiSetVisible(ventanitaLinda,false) showCursor( false ) guiSetInputEnabled(false) end end addEventHandler("onClientGUIClick",root,closeman) Thanks for the help btw. Link to comment
NeXuS™ Posted April 1, 2017 Share Posted April 1, 2017 Did you try to render the image on your screen with dxDrawImage? Link to comment
PezFenix2016 Posted April 1, 2017 Author Share Posted April 1, 2017 48 minutes ago, NeXuS™ said: Did you try to render the image on your screen with dxDrawImage? Well but that isn't the main problem as it seems to been working but the video isn't playing. I guess you mean this part of the code right? function dxDrawImage3D(x,y,z,w,h,m,c,r,...) local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c , ...) end Link to comment
NeXuS™ Posted April 1, 2017 Share Posted April 1, 2017 (edited) So the whole video is not being played? Do you mean it's not getting updated on the 3D material? Try to render it on your screen by dxDrawImage. Edited April 1, 2017 by NeXuS™ Link to comment
PezFenix2016 Posted April 1, 2017 Author Share Posted April 1, 2017 29 minutes ago, NeXuS™ said: So the whole video is not being played? Do you mean it's not getting updated on the 3D material? Try to render it on your screen by dxDrawImage. I'm getting this problem, the video isn't even playing. can you please give me atleast one example about how should I use the dxDraw to render the image? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now