Tete omar Posted July 23, 2012 Share Posted July 23, 2012 function loginPanel() setTimer(guiSetVisible, 10000, 1, GUIEditor_Window[1], true) guiSetInputEnabled( true ) end addEventHandler("onClientPlayerJoin", getRootElement(), loginPanel) i see no error or wrong in this code but for good reason i use guiSetVisible( GUIEditor_Window[1], false ) after i make the window like that guiCreateWindow(.....) -- and the other stuff guiSetVisible( GUIEditor_Window[1], false ) so what's a problem ? Link to comment
MIKI785 Posted July 23, 2012 Share Posted July 23, 2012 You want to show the GUI 10sec after player joins the game? Try replacing this: addEventHandler("onClientPlayerJoin", getRootElement(), loginPanel) with this: addEventHandler("onClientResourceStart", getResourceRoot(getThisResource()), loginPanel) Link to comment
Callum Posted July 23, 2012 Share Posted July 23, 2012 or better, with this; addEventHandler("onClientResourceStart",resourceRoot,loginPanel) Link to comment
Tete omar Posted July 23, 2012 Author Share Posted July 23, 2012 onClientPlayerJoin sometimes doesn't work. anyway thanks for the both of you Link to comment
Guest Guest4401 Posted July 24, 2012 Share Posted July 24, 2012 onClientPlayerJoin sometimes doesn't work. Sometimes? It always won't work for the play himself who joined the server. This event is triggered when a player joins a server. It is triggered for all players except the local player, as the local player joins the server before their client-side resources are started. It would also be possible for two players to join within a few seconds of each other and for the two players' scripts may not receive onClientPlayerJoin events as their scripts wouldn't have started yet. 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