tony402 Posted May 10, 2014 Share Posted May 10, 2014 hi, i was wondering if anyone knows how to make the screen black until the download if complete. like SAES SERVER the screen is black and u cant do anything until the download is complete. Link to comment
xXMADEXx Posted May 10, 2014 Share Posted May 10, 2014 You can use the function fadeCamera Link to comment
JR10 Posted May 10, 2014 Share Posted May 10, 2014 You can also use isTransferBoxActive with onClientRender to detect when the transfer box disappears. Link to comment
tony402 Posted May 12, 2014 Author Share Posted May 12, 2014 So how do I do that JR10? Thnks. Link to comment
#RooTs Posted May 12, 2014 Share Posted May 12, 2014 You can also use isTransferBoxActive with onClientRender to detect when the transfer box disappears. do script for it Man Link to comment
Anubhav Posted May 13, 2014 Share Posted May 13, 2014 function fadeUntilDownload() if isTransferBoxActive() == true then fadeCamera(true) end end addEventHanlder("onClientRender",getRootElement(),fadeUntilDownload) Link to comment
#RooTs Posted May 13, 2014 Share Posted May 13, 2014 function fadeUntilDownload() if isTransferBoxActive() == true then fadeCamera(true) end end addEventHanlder("onClientRender",getRootElement(),fadeUntilDownload) Link to comment
Castillo Posted May 13, 2014 Share Posted May 13, 2014 He just made a typo when writing the function name. addEventHanlder > addEventHandler. Link to comment
xXMADEXx Posted May 14, 2014 Share Posted May 14, 2014 function fadeUntilDownload() if isTransferBoxActive() == true then fadeCamera(true) end end addEventHandler("onClientRender",getRootElement(),fadeUntilDownload) That wouldn't work, because the resource would have to be running on the client side for the event handler to trigger, and the resource has to be downloaded before it will start... You should use this: addEventHandler ( "onPlayerJoin", root, function ( ) fadeCamera ( source, true ) end ) Link to comment
#RooTs Posted May 14, 2014 Share Posted May 14, 2014 what would be the client and server? Client.lua addEventHandler ( "onPlayerJoin", root, function ( ) fadeCamera ( source, true ) end ) And Server.lua function fadeUntilDownload() if isTransferBoxActive() == true then fadeCamera(true) end end addEventHandler("onClientRender",getRootElement(),fadeUntilDownload) Link to comment
.:HyPeX:. Posted May 14, 2014 Share Posted May 14, 2014 Just use madex's code server side. Link to comment
justn Posted May 15, 2014 Share Posted May 15, 2014 Just use this code server-sided addEventHandler ( "onPlayerJoin", root, function ( ) fadeCamera ( source, true ) end ) Link to comment
tony402 Posted May 16, 2014 Author Share Posted May 16, 2014 kk so the Server.lua would be like this right? Server.lua addEventHandler ( "onPlayerJoin", root, function ( ) fadeCamera ( source, true ) end ) that's it or i have to add something else? Link to comment
justn Posted May 16, 2014 Share Posted May 16, 2014 Yes that would be the server, you don't need to add anything else 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