Karuzo Posted January 10, 2014 Posted January 10, 2014 Hey Guys, i want to set a Timer to show the Login-Panel after 50 Seconds. function HandleTheRendering ( ) setTimer(HandleTheRendering,50000,1) addEventHandler("onClientRender", getRootElement(), renderDisplay) -- Keep everything visible with onClientRender. end addEventHandler("onClientPlayerJoin", getRootElement(), HandleTheRendering) But it won't work btw no errors.
Forrest Posted January 10, 2014 Posted January 10, 2014 function HandleTheRendering ( ) setTimer(function() addEventHandler("onClientRender", getRootElement(), renderDisplay) end, 50000, 1) end addEventHandler("onClientPlayerJoin", getRootElement(), HandleTheRendering) Try this, should work I think.
Karuzo Posted January 10, 2014 Author Posted January 10, 2014 (edited) Well that doesn't work also . Edited January 10, 2014 by Guest
.:HyPeX:. Posted January 10, 2014 Posted January 10, 2014 function HandleTheRendering ( ) setTimer(function() addEventHandler("onClientRender", getRootElement(), renderDisplay) end, 50000, 1) end addEventHandler("onClientPlayerJoin", getRootElement(), HandleTheRendering) Try this, should work I think. Not really, it should be like this: CrappyTimer = setTimer(function() addEventHandler("onClientRender", getRootElement(), renderDisplay) CrappyTimer = nil end, 50000, 1)
Karuzo Posted January 10, 2014 Author Posted January 10, 2014 (edited) Thank you @.:HyPeX:.: it works now , BUT, it causes extremeeeely laggs if the loginpanel pops out. and i can't press any button also... Edited January 10, 2014 by Guest
.:HyPeX:. Posted January 10, 2014 Posted January 10, 2014 Thank you @.:HyPeX:.: it works now , BUT, it causes extremeeeely laggs if the loginpanel pops out. and i can't press any button also...Full code : http://pastebin.com/3i94jTq7 How would you define extreme lags? is it a FPS issue, or the server lags? And by the way, my timer is just to replace his timer, you should have the full function.
Karuzo Posted January 10, 2014 Author Posted January 10, 2014 Well no sorry that was just a mod ^^ Btw i want to start a function after 50 seconds do i have to same justl ike above ? i have it now : function start_cl_resource() setTimer(open_log_reg_pannel,50000,1) end addEventHandler("onClientPlayerJoin",getResourceRootElement(getThisResource()),start_cl_resource) But that doesnt work.
Gallardo9944 Posted January 10, 2014 Posted January 10, 2014 addEventHandler("onClientPlayerJoin", getRootElement(), HandleTheRendering) Nope. It will execute the code when the player joins, not when the player finishes downloading. Do it like this: addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),HandleTheRendering)
Karuzo Posted January 10, 2014 Author Posted January 10, 2014 Thank you Gallardo9944 , it worked #closereq
.:HyPeX:. Posted January 10, 2014 Posted January 10, 2014 addEventHandler("onClientPlayerJoin", getRootElement(), HandleTheRendering) Nope. It will execute the code when the player joins, not when the player finishes downloading. Do it like this: addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),HandleTheRendering) Remember to mention that only works on client side
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