Jump to content

[HELP] Login


tony402

Recommended Posts

Posted

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.

Posted
  
function fadeUntilDownload() 
if isTransferBoxActive() == true then 
fadeCamera(true) 
     end 
end 
addEventHanlder("onClientRender",getRootElement(),fadeUntilDownload) 
  

Posted
function fadeUntilDownload() 
if isTransferBoxActive() == true then 
fadeCamera(true) 
     end 
end 
addEventHanlder("onClientRender",getRootElement(),fadeUntilDownload) 

49ddfd103ed9a8bb9f074b8930840cf6.png

Posted
function fadeUntilDownload() 
if isTransferBoxActive() == true then 
fadeCamera(true) 
     end 
end 
addEventHandler("onClientRender",getRootElement(),fadeUntilDownload) 

49ddfd103ed9a8bb9f074b8930840cf6.png

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 ) 

Posted

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) 

Posted

Just use this code server-sided

addEventHandler ( "onPlayerJoin", root, function ( ) fadeCamera ( source, true ) end ) 

Posted

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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...